Reputation: 1705
I am using the M-V-VM architectural pattern.
I want my program to have two views, View A and View B. I start the program with View A. View B is shown by the program when I double click an item in View A.
How should I structure my program such that I can achieve this?
Upvotes: 5
Views: 393
Reputation: 7031
You might be interested in the BookLibrary sample application of the WPF Application Framework (WAF). It shows a master/detail view with two separate Views and two separate ViewModels. Additionally, it has a modal dialog inclusive an own ViewModel for the "Lend To" operation which is connected to the selected book.
Upvotes: 1
Reputation: 30810
Have one ViewModel like :
and View like :
This should solve your problem.
Upvotes: 2