ClassCountToListConverter
A converter that converts a number (for example 7) to a list of numbers (1, 2, 3, 4, 5, 6, 7).
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class CountToListConverter : IValueConverter
Inheritance: objectCountToListConverter
Implements:
Constructors
CountToListConverter()
Declaration
public CountToListConverter()
Properties
Instance
Gets the singleton instance of the CountToListConverter.
Declaration
public static IValueConverter Instance { get; }
Property Value
IValueConverter
The singleton instance of the converter.
Methods
Convert(object, Type, object, CultureInfo)
Converts a count value to a list of sequential numbers starting from 1.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The count value to convert.
targetType
The type to convert to.
parameter
Additional parameter for the conversion.
culture
The culture to use for the conversion.
Returns
A list of integers from 1 to the specified count, or null if the value is invalid.
ConvertBack(object, Type, object, CultureInfo)
Converts back from a list to a count value. This operation is not supported.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back.
targetType
The type to convert back to.
parameter
Additional parameter for the conversion.
culture
The culture to use for the conversion.
Returns
Not supported - throws NotSupportedException.
Exceptions
Thrown when this method is called as it's not supported.