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

A converter that executes an arithmetic comparison operation with the value and an operand.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class ArithmeticComparisonConverter : IValueConverter

Inheritance: objectArithmeticComparisonConverter

Implements: IValueConverter

Constructors

C#
public ArithmeticComparisonConverter()

Properties

Gets or sets the comparison operator. For example '==', '!=', '>', '>=', '<', '<='.

C#
public string Operator { get; set; }

Gets or sets the second (right) operand of the comparison.

C#
public double SecondOperand { get; set; }

Methods

Checks whether the configured arithmetic comparison operation is true.

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

The first operand of the comparison, a number. If the value is not a number, false is returned.

targetTypeType

The type of the target property.

parameterobject

The converter parameter is not used.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

The result from the comparison. If the value is not a number, false is returned.

Backwards conversion is not supported.

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

object