0
votes

I use the MVVM-pattern in my WPF-application. Now I show a dialog with my dialogService:

_dialogService.ShowDialog(Me, settingsViewModel)

The mapping (which view should be shown to this ViewModel) was set in the WindowViewModelMappings class.

My question is now: How can I close the dialog from the settingsViewModel?

Thank you..

1
Seems to be duplicate of [this one][1] [1]: stackoverflow.com/questions/501886/…Oskar

1 Answers

0
votes

Without knowing more about the implementation, I'd recommend you to return a token (guid, ...), that represents that dialog. And then you have a call to close the dialog where you pass in that token.