New to Telerik UI for .NET MAUIStart a free 30-day trial

A converter that checks if the value and the ConverterParameter from the Binding are equal.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class AreEqualToBoolConverter : IValueConverter

Inheritance: objectAreEqualToBoolConverter

Implements: IValueConverter

Constructors

C#
public AreEqualToBoolConverter()

Methods

Converts a value by comparing it with the converter parameter for equality.

C#
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The value to convert.

targetTypeType

The type of the binding target property.

parameterobject

The converter parameter to compare with the value.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

True if the value equals the parameter, otherwise false.

Converts a boolean value back by returning the parameter if the value is true.

C#
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The boolean value to convert back.

targetTypeType

The type of the binding target property.

parameterobject

The converter parameter to return if value is true.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

The parameter if value is true, otherwise null.