BoolToValueConverter
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
public BoolToValueConverter()
Properties
Gets or sets the value to return when the boolean input is false.
public object FalseValue { get; set; }
The value for false condition.
Methods
Converts a boolean value to the corresponding TrueValue or FalseValue.
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
The boolean value to convert.
targetTypeTypeThe type of the binding target property.
parameterobjectThe converter parameter to use.
cultureCultureInfoThe culture to use in the converter.
Returns:TrueValue if the input is true, otherwise FalseValue.
Converts a value back to a boolean by comparing it with TrueValue.
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
The value to convert back.
targetTypeTypeThe type of the binding target property.
parameterobjectThe converter parameter to use.
cultureCultureInfoThe culture to use in the converter.
Returns:True if the value equals TrueValue, otherwise false.