New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI SlideView Commands

The Telerik UI for .NET MAUI SlideView provides the following commands:

  • NavigateToPreviousItemCommand (ICommand)—Handles navigation to the previous item. If the RadSlideView HasLooping property is set to true and the current item is the first item, then the navigation to the last item will happen seemingly as if it was the previous item.

  • NavigateToNextItemCommand (ICommand)—Handles the navigation to the next item. If the RadSlideView HasLooping property is set to true and the current item is the last item, then the navigation to the first item will happen seemingly as if it was the next item.

Example

The following example shows how to add a command.

Add the SlideView definition.

<Grid RowDefinitions="*, Auto">
    <telerik:RadSlideView x:Name="slideView"
                          ItemsSource="{Binding Views}">
        <telerik:RadSlideView.ItemTemplate>
            <DataTemplate>
                <Label Text="{Binding Content}"
                       TextColor="{x:Static Application.AccentColor}"
                       HorizontalTextAlignment="Center"
                       VerticalOptions="Center" />
            </DataTemplate>
        </telerik:RadSlideView.ItemTemplate>
    </telerik:RadSlideView>
    <VerticalStackLayout Grid.Row="1"
                         Spacing="10">
        <Button x:Name="PrevItem"
                Text="Previous Item"
                Command="{Binding NavigateToPreviousItemCommand, Source={x:Reference slideView}}" />
        <Button x:Name="NextItem"
                Text="Next Item"
                Command="{Binding NavigateToNextItemCommand, Source={x:Reference slideView}}" />
    </VerticalStackLayout>
</Grid>

.NET MAUI SlideView Commands

For a runnable example with the SlideView Commands scenario, see the SDKBrowser Demo Application and go to SlideView > Commands.

See Also

In this article