Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
add mechanism for easy access of a dialog from a view model #1943
Using this mechanism you can easily use the MahApps dialogs from a view model. It is agbostic to whatever DI framework you may or may not be using.
To use you add an attached property in your XAML, which will tie the Binding (your view model) to the Window:
Then the DialogCoordinator can be called from your view model, providing it with a context (your view model), it will know which Window to use to show the dialog.
outstanding: I've added to the demo app, but only a single dialog type right now. If you accept this PR I will build out the interface for the other dialog types.