I have a main WPF Window with a Menu Bar and a Status Bar. I want this window to act as MDI Window. I want to define the entire area from below the Menu Bar to just above the Status Bar, where I will be showing other Windows. I want to define a Page or Panel like thing. When I add a new WPF Form, I want it to appear on this location contained within the Main Window. How to do this?
Share
Simple version:
And code-behind:
Then in your code just have a reference to a MainWindow – and use the MainContentGoesHere property to inject the views. Just remember to use UserControls, Panels or ContentControl instead of Window, when you inject them as Window cannot have a parent.
If you want something more fancy – take a look at Prism on CodePlex. It might be overkill for you, but it is actually a well-thought out and lightweight framework.
EDIT: Fixed the order of Children in the DockPanel.