0
votes

I am using MVVM pattern with WPF. I have a mainwindow. Mainwindow has a viewmodel. A button click on the mainwindow opens a Modal dialog. In this Modal dialog there is a user control. This usercontrol also has a viewmodel. When I change a property in the Usercontrol, how can i make the main window aware of the change.

I do not understand the communication between the viewmodels of mainwindow and the modal dialog.

Thanks

1

1 Answers

0
votes

A good way of talking between ViewModel's is by the use of Messaging, a good way of implementing this is by using the MVVM Light Toolkit.

You can learn more about it here