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..
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.