Writing a small WPF app here but I can't crack this problem:
I have a panel at the bottom of a window that the user should expand/collapse at the click of a button. Also, when expanded, the user should be able to resize it by dragging a GridSplitter.
To build this I have laid out the controls in a three-row Grid:
Row[0](Height=*) = some content (not important for the problem)
Row[1](Height=5) = GridSplitter (I have also tried setting Row Height to Auto)
Row[2](Height=Auto) = the resizable/expandable/collapsable "panel"
I have tried controlling the height of the "panel". That allows for expanding/contracting but when resizing with the GridSplitter the "panel" doesn't stretch to be resized. I have tried resetting the "panel" Height = double.NaN
and it's VerticalAlignment = VerticalAlignment.Stretch
when the user starts dragging the splitter but that doesn't work.
If I do not try to control the "panel" Height explicitly it stretches as expected and can be resized by the GridSplitter but that won't allow for Expanding/Contracting at the click of a button.
Any tips on how to achieve both of these features would be great!