I have a View with a progress bar.
This is binded to the ViewModel's property called Progress.
The VM also has a property that starts an execution by calling "Execute" method. This Execute() has about 5 steps, and so my progress bar is to increase in steps of 20.
To maintain the progress made, I am using a property in the Model called "ProgressMaintainer".
Now, I want this ProgressMaintainer to be tied to the Progress property of ViewModel, so that this would update the VM, which would in turn update the UI.
I assumed I could use INotifyPropertyChanged on the mode, but that fails - the reason is that the VM in the code I implemented was just calling the Model's property instead of being binded. So, the PropertyChanged event in the model doesnt fire, and so the
VM doesnt get updated and thus the UI is never updated.
Can someone help me solve this - while sticking to MVVM pattern?
EDIT: After searching here and there, I think there are couple of suggestions to use Asynchronous methods. If someone agrees to the suggestion, can you post a sample code for a simple progress bar app?
View Complete Post