Reputation: 127
I'm creating an WPF MVVM app with regions, MefBootstrapper, user controls (views), etc., and I'm curious about that, is there possible way, from Shell (MainWindow) open another (child) window but also dynamic like in Shell, with the regions and stuff? For example, I have another window (child) which is called from one of the Shell's views by passing different view(s) which should be loaded in child window region(s). Maybe somebody has done that before and can share some infomation about that. Of course did my own search over the internet, but didn't find any useful info, just basic examples how open views not another windows with regions.
Upvotes: 0
Views: 351
Reputation: 1384
Multiple different approaches that you can do this, I will tell you the best:
1) Use ContentControl - Allows the loading of UserControls into a window (in this way, you will have one outer window, and you can load views within it, UserControls)
2) Modern ui for WPF has a really good implementation of this, except they use menu links to load user controls, check it out: https://github.com/firstfloorsoftware/mui
Upvotes: 1