How to open/close view from the XAML code of another view (using MVVM) when specific event is risen?
Asked
Active
Viewed 66 times
0
-
1Crete an attached property that can wire up the event to a command from the model. – Janne Matikainen Oct 26 '16 at 10:44
-
Or steal the one from System.Windows.Interactivity: http://stackoverflow.com/a/4897897/424129 – 15ee8f99-57ff-4f92-890c-b56153 Oct 26 '16 at 13:15
1 Answers
0
Instead of using an event, why not use a variable with DataTriggers?
Have a MainView that has a ContentControl with Content equal to your initial view. Then when you change a variable (for example, from true to false) your MainView sets its Content equal to your other view.

Devin White
- 31
- 3