Class EnumToIntConverter
This class converts enum value to int and vice versa.
Inheritance
System.Object
EnumToIntConverter
Implements
Microsoft.Maui.Controls.IValueConverter
Namespace: Syncfusion.Maui.Core.Converters
Assembly: Syncfusion.Maui.Core.dll
Syntax
public class EnumToIntConverter : Object, IValueConverter
Constructors
EnumToIntConverter()
Declaration
public EnumToIntConverter()
Methods
Convert(Object, Type, Object, CultureInfo)
Converts enum value to an int 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 enum |
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 int value of the enum |
ConvertBack(Object, Type, Object, CultureInfo)
Converts back the int value to enum type
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 int |
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 enum value of the int value |
Implements
Microsoft.Maui.Controls.IValueConverter