Back to Devexpress

SlideViewCommands.ShowNext Property

maui-devexpress-dot-maui-dot-core-dot-slideviewcommands-28ba0ebf.md

latest2.3 KB
Original Source

SlideViewCommands.ShowNext Property

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

Namespace : DevExpress.Maui.Core

Assembly : DevExpress.Maui.Core.dll

NuGet Package : DevExpress.Maui.Core

Declaration

csharp
public Command ShowNext { get; }

Property Value

TypeDescription
Command

A command object.

|

Remarks

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

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

xaml
<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

SlideViewCommands Class

SlideViewCommands Members

DevExpress.Maui.Core Namespace