Hi, I have a win forms program which I am trying to write in WPF. I have a DockPanel which is 800x600, and inside that I want to add 1 child control at a time to fill the available space. In winforms this worked by just setting the item to Dock fill. I have
set the dockPanel to LastChildFill, the problem is the child control I am trying to add is 400x300. In Winforms this was automatically increased to 800x600, and this is what I am trying to achieve with the dockPanel, but I am not sure how.
If I remove the height and width that are set in the control, then this does fill as expected. So is there anyway to get the dockpanel to override the child controls size, and make sure it fills the available area?
View Complete Post