Spinner
The Spinner for .NET MAUI is a control which allows you to display items in a list. It also provides an option to loop through its items.
The Spinner is used for the DatePicker, ListPicker. Also you can use it inside the TemplatedPicker SelectorTemplate.
Configuration
-
ItemLength(double)—Defines the length of the items in the spinner. -
ItemSpacing(double)—Defines the spacing between the items. -
IsLooping(bool)—Defines a value indicating whether the items will loop infinitely while scrolling. By default, the looping is disabled. To enable it, setIsLooping="True".
Data Binding
-
ItemsSource(IList)—Defines a collection used to generate the content of the spinner. -
SelectedItem(object)—Defines the selected item. -
SelectedIndex(int)—Specifies the selected index of the Spinner control. -
DisplayStringFormat(string)—Defines the string format that is used to display the items of the spinner. -
DisplayMemberPath(string)—Specifies a path to the property that is used to display the items of the spinner.
Templates
-
ItemTemplate(DataTemplate)—Defines the template for the spinner items. -
SelectedItemTemplate(DataTemplate)—Defines the template for the selected spinner item.
Styling
-
ItemStyle(Style)—Defines the style for the spinner items. -
SelectedItemStyle(Style)—Defines the style for the selected spinner item.
Events
The Spinner exposes the SelectionChanged event that is raised when the user confirms the selected item.
For a sample example with the Spinner control, refer to the TemplatedPicker/DataBinding folder of the Telerik UI for .NET MAUI SDKBrowser Application.