ClassBoolToValueConverter
Converts boolean values to specified objects based on true/false conditions.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class BoolToValueConverter : IValueConverter
Inheritance: objectBoolToValueConverter
Implements:
Constructors
BoolToValueConverter()
Declaration
public BoolToValueConverter()
Properties
FalseValue
Gets or sets the value to return when the boolean input is false.
Declaration
public object FalseValue { get; set; }
Property Value
The value for false condition.
Methods
Convert(object, Type, object, CultureInfo)
Converts a boolean value to the corresponding TrueValue or FalseValue.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The boolean value to convert.
targetType
The type of the binding target property.
parameter
The converter parameter to use.
culture
The culture to use in the converter.
Returns
TrueValue if the input is true, otherwise FalseValue.
ConvertBack(object, Type, object, CultureInfo)
Converts a value back to a boolean by comparing it with TrueValue.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back.
targetType
The type of the binding target property.
parameter
The converter parameter to use.
culture
The culture to use in the converter.
Returns
True if the value equals TrueValue, otherwise false.