I am currently busy with WPF. I know that in winforms we can open a form in a panel, which is relatively easy to do. But how do we do that in WPF? My WPF Main Window now has three items in it, namely: Navigation[DockPanel], Content[StackPanel] and this StackPanel is inside anotehr DockPanel... Navigation has a button in it. When I click this button, I want another WPF window to open inside the Content, which is a stackpanel. Is this possible in WPF? It does not matter if its XAML or C# code for WPF, i just want to know where to start and how to achieve it. Thanx in advance.
Asked
Active
Viewed 667 times
0
-
This may sound snide, but I don't have a Windows machine here to test: Did you just try it? It might not work, but I wouldn't be surprised if you could just do something like `stack.Children.Add(new TheWindow())`. If that specifically doesn't work, you can create a control that is used both by your window and inserted into your panel. – John C May 23 '14 at 11:35
-
Hi Frederik, I started to write an answer then realized it was almost the exact same as another answer I had written a while back, so I marked this one as a duplicate to that one. If the linked post isn't what you're looking for, let me know :) – Rachel Jul 04 '14 at 14:18