Class NumberToBoolConverter
This class converts number value to boolean and vice versa.
Inheritance
System.Object
NumberToBoolConverter
Implements
Microsoft.Maui.Controls.IValueConverter
Namespace: Syncfusion.Maui.Core.Converters
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class NumberToBoolConverter : Object, IValueConverter
Constructors
NumberToBoolConverter()
Declaration
public NumberToBoolConverter()
Methods
Convert(Object, Type, Object, CultureInfo)
Converts number value to an boolean type.
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 number |
| System.Type | targetType | The type of the 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 boolean value of the number |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
ConvertBack(Object, Type, Object, CultureInfo)
Converts back the boolean value to number
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The value be the type of boolean |
| System.Type | targetType | The type of the 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 boolean value of the number |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
Implements
Microsoft.Maui.Controls.IValueConverter