lbugnion / mvvmlight

The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Windows 10 UWP, Windows Presentation Foundation (WPF), Silverlight, Windows Phone.
http://www.mvvmlight.net
MIT License
1.16k stars 311 forks source link

Modifiing property from INotifyPropertyChanged Class after GoToAsync -> Pop -> GoToAsync result in ObjectDisposedException #86

Open jm-parent opened 4 years ago

jm-parent commented 4 years ago

Hi all !

Like the title said , i need some help about binding Observable model :( This is what i have :

A model with INotifyPropertyChanged ( i tried before with ObservableObject from MvvmHelper James Montemagno ) image

3 buttons binded on a command that modify the properties image

The commands image

What i did : GotoAsync("ScanWorking") , select PowerKm , validate , await Shell.Current.Navigation.PopAsync(); GotoAsync("ScanWorking") , Selected button is still selected , and when i'm try to select another PowerKw , i get this error.

image

Poping page dispose my data model object , and i dont know how i can handle this ?

Any one have full example with Shell & MvvmLight ?

jm-parent commented 4 years ago

Update:

Same thing with any property :'(

image

First time on screen , modify value , validate => ok pop Go to the screen a second time. Data seems to still be there. Click to chose another value Crash 👎