Skip to main content
ON

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SlideViewCommands.ShowPrevious Property

Returns the command to show the previous item in the SlideView item source.

Namespace: DevExpress.Maui.Core

Assembly: DevExpress.Maui.Core.dll

NuGet Package: DevExpress.Maui.Core

#Declaration

C#
public Command ShowPrevious { get; }

#Property Value

Type Description
Command

A command object.

#Remarks

If SlideView.AllowLooping is disabled, the SlideView control automatically prevents the ShowPrevious command from switching from the first item to the last item in the ItemsSource.

The following example implements a simple gallery in which users can tap Previous and Next buttons to scroll images:

DevExpress SlideView for .NET MAUI - A simple image gallery example

<Grid ColumnDefinitions="*,*">
    <dx:SlideView x:Name="slideView" AllowLooping="True"> 
        <!--...-->
    </dx:SlideView>
    <dx:DXButton Grid.Column="0" Content="&lt;" 
                 Command="{Binding Commands.ShowPrevious, Source={x:Reference slideView}}"
                 WidthRequest="60" HeightRequest="60" 
                 VerticalOptions="Center" HorizontalOptions="Start"
                 BackgroundColor="LightGray" DisabledBackgroundColor="Gray" 
                 TextColor="Black"  Margin="20,0,0,0" FontSize="20"/>
    <dx:DXButton Grid.Column="1" Content="&gt;" 
                 Command="{Binding Commands.ShowNext, Source={x:Reference slideView}}" 
                 WidthRequest="60" HeightRequest="60" 
                 VerticalOptions="Center" HorizontalOptions="End" 
                 BackgroundColor="LightGray" DisabledBackgroundColor="Gray" 
                 TextColor="Black" Margin="0,0,20,0" FontSize="20"/>
</Grid>
See Also