Class EnumToBooleanConverter
Converter to handle boolean values based on enumeration values.
Inheritance
System.Object
EnumToBooleanConverter
Implements
System.Windows.Data.IValueConverter
Namespace: Syncfusion.UI.Xaml.Diagram.Utility
Assembly: Syncfusion.SfDiagram.WPF.dll
Syntax
public class EnumToBooleanConverter : Object, IValueConverter
Constructors
EnumToBooleanConverter()
Declaration
public EnumToBooleanConverter()
Methods
Convert(Object, Type, Object, CultureInfo)
To convert enumeration type values into boolean values.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo language)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Gets enumeration object value to convert boolean. |
System.Type | targetType | Gets target type. |
System.Object | parameter | Gets object parameter. |
System.Globalization.CultureInfo | language | Gets culture info value. |
Returns
Type | Description |
---|---|
System.Object | Returns true, when Display mode is expanded; Otherwise false. |
ConvertBack(Object, Type, Object, CultureInfo)
To convert boolean values into enumeration type values.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo language)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Gets boolean value to cnvert enumeration type. |
System.Type | targetType | Gets target type value. |
System.Object | parameter | Gets object parameter. |
System.Globalization.CultureInfo | language | Gets culture info value. |
Returns
Type | Description |
---|---|
System.Object | Returns DisplayMode is expanded, when boolan is true; Otherwise returns display mode as Compact. |
Implements
System.Windows.Data.IValueConverter