.NET MAUI SlideView Item Template
You can populate the SlideView component with various types of objects, for example, string
, int
, business objects, and so on. To customize the visualization of the views in the ItemsSource
of the control, use its ItemTemplate
property. The template can contain any of the views that you use to display the data.
Example
The following example shows how to populate the ItemsSource
with business items and customize their appearance.
1. Create a sample CustomItem
class.
2. Add a View Model containing a collection of MyItem
objects.
3. Add the SlideView definition with a sample ItemTemplate
applied.
4. Set the BindingContext
to the View Model:
Here is the result:
For a runnable example with the SlideView ItemTemplate scenario, see the SDKBrowser Demo Application and go to SlideView > Templates.