CountToListConverter
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
public CountToListConverter()
Properties
Instance
IValueConverter
Gets the singleton instance of the CountToListConverter.
public static IValueConverter Instance { get; }
The singleton instance of the converter.
Methods
Converts a count value to a list of sequential numbers starting from 1.
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
The count value to convert.
targetTypeTypeThe type to convert to.
parameterobjectAdditional parameter for the conversion.
cultureCultureInfoThe culture to use for the conversion.
Returns:A list of integers from 1 to the specified count, or null if the value is invalid.
Converts back from a list to a count value. This operation is not supported.
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
The value to convert back.
targetTypeTypeThe type to convert back to.
parameterobjectAdditional parameter for the conversion.
cultureCultureInfoThe culture to use for the conversion.
Returns:Not supported - throws NotSupportedException.
Exceptions:Thrown when this method is called as it's not supported.