Hey,
Didn't get a reply to this on the MSDN WPF forum, so I thought I'd try here.
Some WPF controls - like the button - seem to happily consume all the availible space in its' container if you don't specify the height it is to have.
And some - like the ones I need to use right now, the (multiline) TextBox and the ListBox - seem more worried about just taking the space necessary to fit their contents, and no more.
If you put these guys in a cell in a UniformGrid, they will expand to fit the available space. However, uniformgrids are not right for all situations. What if you have a grid with some rows set to a * height to divide the height between itself and other * rows? What if you have a StackPanel and you have a label, a list and a button - how can you get the list to take up all the space not eaten by the label and the button?
I would think this would really be a basic layout requirement, but I can't figure out how to get them to fill the space that they could (putting them in a DockPanel and setting it to fill also doesn't work, it seems, since the DockPanel only takes up the space needed by its' subcontrols..
I have tried to search for the answer to this, and I am guessing the answer must be out there, as a resizable GUI would be quite horrible if you had to play with Height/Width and MinHeight/MinWidth etc.
Can you bind your height and width to the grid cell you occupy? Or is there another way to do this?
Very grateful for any insights!
EDIT: Could only accept one answer, so I gave it to the guy with the least points already. Hope that's ok. :)
Rune