We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show or hide drag indicator based on the DragStartMode in Xamarin.Forms ListView (SfListView)

Platform: Xamarin.Forms |
Control: SfListView

You can handle the DragIndicatorView visibility based on DragStartMode by using the converter in the Xamarin.Forms SfListView.


Set the converter to the IsVisible property of DragIndicatorView.

<syncfusion:SfListView x:Name="listView" Grid.Row="1" ItemSize="60" BackgroundColor="#FFE8E8EC" GroupHeaderSize="50" ItemsSource="{Binding ToDoList}" DragStartMode="OnHold" SelectionMode="None">
            <Frame HasShadow="True" BackgroundColor="White" Padding="0">
                    <OnPlatform x:TypeArguments="x:Boolean" Android="True" WinPhone="False" iOS="False"/>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="60" />
                    <Label x:Name="textLabel" Text="{Binding Name}" FontSize="15" TextColor="#333333" VerticalOptions="Center" HorizontalOptions="Start" Margin="5,0,0,0" />
                    <syncfusion:DragIndicatorView Grid.Column="1" ListView="{x:Reference listView}" HorizontalOptions="Center" VerticalOptions="Center" IsVisible="{Binding DragStartMode, Source={x:Reference listView},Converter={StaticResource dragValueConverter}}">
                        <Grid Padding="10, 20, 20, 20">
                            <Image Source="DragIndicator.png" VerticalOptions="Center" HorizontalOptions="Center" />


Converter to return true or false based on the DragStartMode.

namespace ListViewXamarin
    public class DragValueConverter : IValueConverter
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            var dragMode = (DragStartMode)value;
            if (dragMode == DragStartMode.OnHold || dragMode == DragStartMode.OnDragIndicator)
                return true;
                return false;
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            throw new NotImplementedException();

View sample in GitHub

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile