Skip to content

Files

Latest commit

Feb 12, 2024
276434b · Feb 12, 2024

History

History
59 lines (42 loc) · 2.17 KB
·

enable-indicator-click-slideview-maui.md

File metadata and controls

59 lines (42 loc) · 2.17 KB
·
title description type page_title slug tags res_type
Enabling Navigation between SlideView Items by Using the Indicator
Learn how to enable the SlideView for .NET MAUI to navigate between the items when users click on the indicator on their mobile devices.
how-to
Enable Indicator Click to Navigate to Items in SlideView for .NET MAUI
enable-indicator-click-slideview-maui
maui, slideview, indicator, click, swipe
kb

Environment

Version Product Author
6.6.0 Telerik UI for .NET MAUI SlideView Dobrinka Yordanova

Description

I want to enable users to navigate to the different SlideView items by using the indicator. Currently, changing the item with the indicator works fine on desktop, but isn't possible on mobile devices.

Solution

To enable navigation through the indicator in SlideView for .NET MAUI, follow these steps:

1. In your XAML file, add the following namespace declarations:

xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"

2. Inside the ContentPage element, create a ResourceDictionary and define a style for the SlideViewIndicator:

<ContentPage.Resources>
    <ResourceDictionary>
        <Style x:Key="IndicatorStyle" TargetType="telerik:SlideViewIndicator">
            <Setter Property="NavigateOnItemTap" Value="True" />
        </Style>
    </ResourceDictionary>
</ContentPage.Resources>

3. Add the IndicatorStyle to your RadSlideView control and set the NavigateOnItemTap property to True:

<telerik:RadSlideView x:Name="slideview" AutomationId="slideView" IndicatorStyle="{StaticResource IndicatorStyle}">
    <!-- Add your slide view items here -->
</telerik:RadSlideView>

By following these steps, you enable mobile device users to switch between SlideView items by tapping the indicator.

Notes

For all available SlideView indicator properties, see the .NET MAUI SlideView Indicator article.

See Also