I have a WPF project in C# I am working on. I have a TabPage that contains three controls on it: 2 textboxes and a datagridview. I want to have all three fit onto the page based on the size of the parent (the tabpage it is located on).
One textbox should be along the right side (ending at the other textbox), and the last text box along the full bottom.
GRID | TEXTBOX1
— TEXTBOX —
I have been experimenting with the Docking and Anchoring styles but I’m not sure how to use them properly with multiple elements on the page.
Currently I have the Textbox1 Dock.Right, Textbox2 Dock.Bottom. I want the remaining DataGridView to fill whatever space is left. However, using the Dock.Fill just fills the whole parent form and overlaps the textboxes.
Am I going about this properly? I saw something on DockPanel’s which had a “LastChildFill” property, but it didn’t seem to apply to me (could be wrong?). Thanks in advance!
Just use
Grids.e.g. one
Gridwith two rows, top row containing anotherGridwith two columns.