I think it is mostly architecture question. I have a View and my ViewModel class set as DataContext. Now, I have a click event binded to View by ICommand.
So what we have, user click button in View I get this event in ViewModel and I would like to open Dialog.
As for me Dialog it is associated with a View and View should open this dialog, so it is means that this method
public void OpenDialog(){...}
should reside in View and I should someway to call this method from my ViewModel where I got click event.
Questions is:
- If I understand this MVVM WPF approach in a right way
- How to make this connection (best practices)