ClassArithmeticConverter
A converter that executes an arithmetic operation with the value and one operand.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class ArithmeticConverter : IValueConverter
Inheritance: objectArithmeticConverter
Implements:
Constructors
ArithmeticConverter()
Declaration
public ArithmeticConverter()
Fields
Minus1Converter
Gets a pre-configured converter that subtracts 1 from the input value.
Declaration
public static readonly ArithmeticConverter Minus1Converter
Field Value
Plus1Converter
Gets a pre-configured converter that adds 1 to the input value.
Declaration
public static readonly ArithmeticConverter Plus1Converter
Field Value
Properties
FirstOperand
Gets or sets the first (left) operand.
Operator
Gets or sets the arithmetic operator. For example '+', '-', '*', '/', '%'.
SecondOperand
Gets or sets the second (right) operand.
Methods
Convert(object, Type, object, CultureInfo)
Converts a value by applying the configured arithmetic operation.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert.
targetType
The type of the target property.
parameter
The converter parameter to use.
culture
The culture to use in the converter.
Returns
The converted value.
ConvertBack(object, Type, object, CultureInfo)
Converts a value back by applying the reverse of the configured arithmetic operation.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back.
targetType
The type of the target property.
parameter
The converter parameter to use.
culture
The culture to use in the converter.
Returns
The converted value.