You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# How to handle buttonaction of ListView item whendragging in Xamarin.Forms (SflistView)?
2
2
3
-
You can disable the button click action which loaded in ItemTemplate by maintaining a property in the view model and skip the process using Xamarin.Forms Listview when Drag and Drop ListViewItem.
3
+
You can handle the button click action that is loaded in the [ItemTemplate](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfListView.XForms~Syncfusion.ListView.XForms.SfListView~ItemTemplate.html?) by maintaining a property in the **ViewModel**and skip the process while drag and drop the [ListViewItem](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfListView.XForms~Syncfusion.ListView.XForms.ListViewItem.html?) using Xamarin.Forms SfListView.
Bind Button.Command](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/button#using-the-command-interface) to skip the button click action.
@@ -27,46 +37,69 @@ You can disable the button click action which loaded in ItemTemplate by maintain
27
37
</ContentPage.Content>
28
38
</ContentPage>
29
39
```
40
+
**C#**
30
41
31
-
```
32
-
listview.ItemDragging += Listview_ItemDragging;
42
+
Behavior class to trigger the [SfListView.ItemDragging](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfListView.XForms~Syncfusion.ListView.XForms.SfListView~ItemDragging_EV.html?) event. Update the property **isDragEndRaised** to **true**, based on the [DragAction](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfListView.XForms~Syncfusion.ListView.XForms.ItemDraggingEventArgs~Action.html?).
0 commit comments