Possible Duplicate:
WFP combine expander and grid (resizable expander)
I'm sure there's an easy answer to this question, but I'm not seeing it.
I'm laying out a Grid
that contains three columns. The first contains an Expander
whose ExpandDirection
is Right
. The second is a GridSplitter
. The third contains a DockPanel
full of stuff.
The goal is that when the Expander
is collapsed, the grid column is the width of its header. When it's expanded, the user should be able to change the width of the expanded area by dragging the GridSplitter
.
I can't figure out the right way to do this. Dragging the GridSplitter
changes the width of the column, and I don't really want to change the width of the column, I want to change the maximum width of the expander. I can't figure out how to implement an expander with a maximum width that can be changed by dragging, though - at least, not without writing a bunch of code.
Any idea? Can this even be done in straight XAML? Is it just blindingly obvious?