views:

198

answers:

2

Hi,

I'm working on a UI for a WPF application. I have in my window Stack Panel with some Expanders inside. In each Expander are some controls, one being a List Box. What I want to do is have the List Box resize (shrink or grow) when the window is resized. At the moment, when I re-size, the expander are getting clipped off but the listbox (sometimes very long in height) remains unchanged. How do I go about making this happen.

A good example is in Outlook 2007, the "Mail Folder" on the left shrinks with window size but the other controls don't.

Thanks in advance.

A: 

The StackPanel won't push a height on its children - it allows each child to size as big as it likes. You might try using a Grid around the Expanders, and giving each Row a star height so that the contents resize.

Paul Stovell
A: 
Tri Q