Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update the view from a viewmodel in WPF using MVVM design

Tags:

mvvm

I am using the WFP with MVVM design for my first project and I am having the problem to update the view after I process a command from client to update the entity. At this time, the view can talks to the viewmodel but the viewmodel could not talk back to view. Anyone has any idea how to make this works? Thanks, Jdang

like image 573
AustinTX Avatar asked May 09 '11 13:05

AustinTX


1 Answers

You should make the ViewModel implement INotifyPropertyChanged and fire the PropertyChanged event when the ViewModel properties change. Assuming that the UI is bound to the ViewModel properties this should work.

like image 187
Jackson Pope Avatar answered Oct 16 '22 17:10

Jackson Pope