Class BoolToObjectConverter
This class converts boolean value to object and vice versa.
Inheritance
System.Object
BoolToObjectConverter
Implements
Microsoft.Maui.Controls.IValueConverter
Namespace: Syncfusion.Maui.Core.Converters
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class BoolToObjectConverter : Object, IValueConverter
Constructors
BoolToObjectConverter()
Declaration
public BoolToObjectConverter()
Properties
FalseValueObject
Gets or sets the value to be returned when the boolean is false
Declaration
public object FalseValueObject { get; set; }
Property Value
Type |
---|
System.Object |
TrueValueObject
Gets or sets the value to be returned when the boolean is true
Declaration
public object TrueValueObject { get; set; }
Property Value
Type |
---|
System.Object |
Methods
Convert(Object, Type, Object, CultureInfo)
Converts boolean value to an object type.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The source data being passed to the target. |
System.Type | targetType | The type of the target property, as a type reference. |
System.Object | parameter | An optional parameter to be used to invert the converter logic. |
System.Globalization.CultureInfo | culture | The culture to use in the converter |
Returns
Type | Description |
---|---|
System.Object | The value to be passed to the target property. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ConvertBack(Object, Type, Object, CultureInfo)
Converts back the object to boolean type
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The target data being passed to the source. |
System.Type | targetType | The type of the target property, as a type reference. |
System.Object | parameter | An optional parameter to be used to invert the converter logic. |
System.Globalization.CultureInfo | culture | The culture to use in the converter |
Returns
Type | Description |
---|---|
System.Object | The value to be passed to the source object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
Implements
Microsoft.Maui.Controls.IValueConverter