0

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

rakete
  • 2,953
  • 11
  • 54
  • 108
  • Seems to be duplicate of [this one][1] [1]: http://stackoverflow.com/questions/501886/wpf-mvvm-newbie-how-should-the-viewmodel-close-the-form – Oskar Oct 14 '11 at 05:07

1 Answers1

0

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.

Martin Moser
  • 6,219
  • 1
  • 27
  • 41