Class BoolToObjectConverter
This class converts a boolean value into an other object.
Can be used to convert true/false to visibility, a couple of colors, couple of images, etc.
Inheritance
System.Object
BoolToObjectConverter
Implements
System.Windows.Data.IValueConverter
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
public class BoolToObjectConverter : DependencyObject, IValueConverter
Constructors
BoolToObjectConverter()
Declaration
public BoolToObjectConverter()
Fields
CanConvertToTargetTypeProperty
Declaration
public static readonly DependencyProperty CanConvertToTargetTypeProperty
Field Value
Type |
System.Windows.DependencyProperty |
FalseValueProperty
Declaration
public static readonly DependencyProperty FalseValueProperty
Field Value
Type |
System.Windows.DependencyProperty |
TrueValueProperty
Declaration
public static readonly DependencyProperty TrueValueProperty
Field Value
Type |
System.Windows.DependencyProperty |
Properties
CanConvertToTargetType
Declaration
public bool CanConvertToTargetType { get; set; }
Property Value
FalseValue
Gets or sets the value to be returned when the boolean is false
Declaration
public object FalseValue { get; set; }
Property Value
TrueValue
Gets or sets the value to be returned when the boolean is true
Declaration
public object TrueValue { get; set; }
Property Value
Methods
Convert(Object, Type, Object, CultureInfo)
Declaration
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
System.Type |
targetType |
|
System.Object |
parameter |
|
System.Globalization.CultureInfo |
culture |
|
Returns
ConvertBack(Object, Type, Object, CultureInfo)
Declaration
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
System.Type |
targetType |
|
System.Object |
parameter |
|
System.Globalization.CultureInfo |
culture |
|
Returns
Implements
System.Windows.Data.IValueConverter