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