Class CompareConverter
This class converts true object or false object or boolean based on the comparison result
Inheritance
Implements
Namespace: Syncfusion.Maui.Core.Converters
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class CompareConverter : Object, IMarkupExtension<IValueConverter>, IMarkupExtension, IValueConverter
Constructors
CompareConverter()
Declaration
public CompareConverter()
Properties
ComparisonOperator
Gets or sets the value of comparison operator.
Declaration
public CompareConverter.OperatorType ComparisonOperator { get; set; }
Property Value
Type |
---|
CompareConverter.OperatorType |
FalseValueObject
Gets or sets the value to be returned when the comparison is false
Declaration
public object FalseValueObject { get; set; }
Property Value
Type |
---|
System.Object |
TrueValueObject
Gets or sets the value to be returned when the comparison is true
Declaration
public object TrueValueObject { get; set; }
Property Value
Type |
---|
System.Object |
ValueForComparing
Gets or sets the value of comparing value.
Declaration
public IComparable ValueForComparing { get; set; }
Property Value
Type |
---|
System.IComparable |
Methods
Convert(Object, Type, Object, CultureInfo)
Converts an object that implements IComparable to a specified object or a boolean based on a comparison result.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value must be the type of color |
System.Type | targetType | The type of target property |
System.Object | parameter | An additional parameter for the converter to handle, not used |
System.Globalization.CultureInfo | culture | The culture to use in the converter, not used |
Returns
Type | Description |
---|---|
System.Object | Returns the true object or false object or boolean value based on the comparison result |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Exception is thrown when the value type is null or not a type of comparable interface |
ConvertBack(Object, Type, Object, CultureInfo)
Converts back are impossible to revert to the original value
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.Type | targetType | |
System.Object | parameter | |
System.Globalization.CultureInfo | culture |
Returns
Type |
---|
System.Object |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
ProvideValue(IServiceProvider)
Declaration
public IValueConverter ProvideValue(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider |
Returns
Type |
---|
Microsoft.Maui.Controls.IValueConverter |