I’ve just inherited an old WinForms app with a UI layout like this:

I’m tasked with updating several things about the software one of which is porting it to WPF which I’ve not previously worked with. I’m also told that the new WPF UI must look identical to the existing UI layout so I’m trying to figure out how to create that layout in WPF. I need a toolbar across the top of the window which stretches the entire width of the fixed-size window. Can I do that in the default grid or do I need a dockpanel to do that? Also, I’m assuming that I would use a grid with 2 columns and 3 rows to layout the six groupboxes?
Anything you can do with a
DockPanelcan also be done with aGrid— theDockPanelis just a shortcut. So yes, you can do all this with the defaultGrid.As for how to do the layout: it depends on how you want things to resize. Does everything stay proportional when you resize? If so, a single
Gridwith three columns (and percentage sizes for theColumnDefinitions) would be fine. You would actually need four rows, though, not three — the firstRowDefinitionwould be for theToolBar(usingColumnSpan="3") and would needHeight="Auto"so it uses theToolBar‘s default size; the remaining rows would be percentage-sized.Try that, see if it works for you. If the resizing needs to be more complicated than just proportional, then post a second screenshot of the window at a different size, and we could try to help you further.