Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/BarsDemo.Wpf/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/BarsDemo.Wpf/Modules/BarProperties.xaml.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Imports DevExpress.Xpf.Bars
Imports DevExpress.Xpf.Core
Imports DevExpress.Xpf.Utils

Namespace BarsDemo
	Public Class InverseBoolConverter
		Implements IValueConverter
		Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
			Return Not(CBool(value))
		End Function
		Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
			Throw New NotImplementedException()
		End Function
	End Class
	Partial Public Class BarProperties
		Inherits BarsDemoModule
		Public Shared ReadOnly BarProperty As DependencyProperty = DependencyPropertyManager.Register("Bar", GetType(Bar), GetType(BarProperties), New FrameworkPropertyMetadata())
		Public Property Bar() As Bar
			Get
				Return CType(GetValue(BarProperty), Bar)
			End Get
			Set(ByVal value As Bar)
				SetValue(BarProperty, value)
			End Set
		End Property

		Public Sub New()
			InitializeComponent()
			Bar = bar1
		End Sub

		Protected Overridable Sub isVisibleCheck_EditValueChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
			Me.props.IsEnabled = CBool(Me.isVisibleCheck.IsChecked)
		End Sub
		Protected Overridable Sub isEnabledCheck_EditValueChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
			Me.props.IsEnabled = CBool(Me.isEnabledCheck.IsChecked)
		End Sub
		Protected Overridable Sub barTypeBar_Checked(ByVal sender As Object, ByVal e As EventArgs)
			If Bar Is Nothing Then
				Return
			End If
			Bar.IsStatusBar = False
			Bar.IsMainMenu = Bar.IsStatusBar
			Me.showDragWidgetCheck.IsEnabled = True
			Me.showCustomizationButtonCheck.IsEnabled = True
			Me.containerName.SelectedIndex = 0
			allowCollapseCheck_UpdateEnabled()
		End Sub
		Protected Overridable Sub barTypeMainMenu_Checked(ByVal sender As Object, ByVal e As EventArgs)
			If Bar Is Nothing Then
				Return
			End If
			Bar.IsMainMenu = True
			Me.showDragWidgetCheck.IsEnabled = False
			Me.showCustomizationButtonCheck.IsEnabled = True
			Me.containerName.SelectedIndex = 0
			allowCollapseCheck_UpdateEnabled()
		End Sub
		Protected Overridable Sub barTypeStatusBar_Checked(ByVal sender As Object, ByVal e As EventArgs)
			If Bar Is Nothing Then
				Return
			End If
			Bar.IsStatusBar = True
			Me.showDragWidgetCheck.IsEnabled = False
			Me.showCustomizationButtonCheck.IsEnabled = False
			Me.containerName.SelectedIndex = 1
			allowCollapseCheck_UpdateEnabled()
		End Sub
		Protected Overridable Sub useWholeRowCheck_EditValueChanged(ByVal sender As Object, ByVal e As EventArgs)
			allowCollapseCheck_UpdateEnabled()
		End Sub
		Protected Overridable Sub allowCollapseCheck_UpdateEnabled()
			If Bar Is Nothing Then
				Return
			End If
			allowCollapseCheck.IsEnabled = Not Bar.IsUseWholeRow
		End Sub
	End Class
End Namespace