Hello,
I have figured out how to close Window from my ViewModel.
Now I need to solve window close problem from the other side.
I need to trigger Save() method in my ViewModel when the user clicks window's close button.
I was thinking about binding Command property to Window's close event, but my ViewModel is related to the user control and in that case Close command will not be executed.
I was looking at this question as well http://stackoverflow.com/questions/502761/disposing-wpf-user-controls , but I'm afraid that putting Save method call in Dispose method is a little bit too late.
Is there any way to solve this problem?
Thank You very much!