protected override void OnDetachingFrom(Syncfusion.ListView.XForms.SfListView bindable) { ListView.SwipeStarted -= ListView_SwipeStarted; ListView.SwipeEnded -= ListView_SwipeEnded; ListView = null; SwipingViewModel = null; base.OnDetachingFrom(bindable); }
protected override void OnAttachedTo(Syncfusion.ListView.XForms.SfListView bindable) { ListView = bindable; viewModel = new ListViewSwipingViewModel(); ListView.BindingContext = viewModel; (ListView.BindingContext as ListViewSwipingViewModel).ResetSwipeView += Behavior_ResetSwipeView; base.OnAttachedTo(bindable); }
protected override void OnAttachedTo(Syncfusion.ListView.XForms.SfListView bindable) { ListView = bindable; ListView.SwipeStarted += ListView_SwipeStarted; ListView.SwipeEnded += ListView_SwipeEnded; SwipingViewModel = new ListViewSwipingViewModel(); SwipingViewModel.sfListView = ListView; bindable.BindingContext = SwipingViewModel; ListView.ItemsSource = SwipingViewModel.InboxInfo; base.OnAttachedTo(bindable); }