Skip to content

Commit fcfdbcb

Browse files
authored
Merge pull request #1 from LakshmiNatarajan21/21774
Sample updated for XAMARIN-21774
2 parents 1bd24c7 + 10f59f6 commit fcfdbcb

File tree

1 file changed

+1
-3
lines changed
  • ListViewSample/ListViewPrism/ListViewPrism/Helper

1 file changed

+1
-3
lines changed

ListViewSample/ListViewPrism/ListViewPrism/Helper/Behavior.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@ namespace Grouping
88
{
99
class Behavior : Behavior <SfListView>
1010
{
11-
ListViewGroupingViewModel viewModel;
1211
public SfListView listview { get; private set; }
1312
protected override void OnAttachedTo(SfListView bindable)
1413
{
1514
base.OnAttachedTo(bindable);
1615
listview = bindable as SfListView;
17-
viewModel = new ListViewGroupingViewModel();
18-
listview.BindingContext = viewModel;
1916
listview.ItemDragging += Listview_ItemDragging;
2017
}
2118

2219
private void Listview_ItemDragging(object sender, ItemDraggingEventArgs e)
2320
{
21+
var viewModel = (sender as SfListView).BindingContext as ListViewGroupingViewModel;
2422
if (e.Action == Syncfusion.ListView.XForms.DragAction.Drop)
2523
{
2624
viewModel.isDragEndRaised = true;

0 commit comments

Comments
 (0)