protected override void OnDetachingFrom(SfListView bindable) { ListView.SwipeEnded -= ListView_SwipeEnded; ListView.PropertyChanged -= ListView_PropertyChanged; ListView = null; SwipingViewModel = null; base.OnDetachingFrom(bindable); }
protected override void OnAttachedTo(SfListView bindable) { ListView = bindable; ListView.SwipeEnded += ListView_SwipeEnded; ListView.PropertyChanged += ListView_PropertyChanged; SwipingViewModel = new ListViewSwipingViewModel(); SwipingViewModel.sfListView = ListView; bindable.BindingContext = SwipingViewModel; ListView.ItemsSource = SwipingViewModel.InboxInfo; base.OnAttachedTo(bindable); }