I\'ve got a WPF window with SizeToContent=\"Height\"
. This window contains an
that displays a list of recent activity. What I\'d lik
The easiest way to cope is to take manual resizing out of the equation by setting ResizeMode="NoResize"
on the window. However, if you have WindowStyle="None"
I've noticed that on Vista Aero this causes the window to completely shed the "chrome" and the window looks awkward. Also, this somewhat of a cop out since it looks like you want to give the user resizing capabilities.
The problem is that you have two conflicting goals: 1.) you always want SizeToContent="Height"
when collapsing the expander control, 2.) you want SizeToContent="Height"
when expanding the expander control unless the user has manually resized the window (SizeToContent="Manual"), in which case you'd like to return to the user's manual height.
Yikes. I don't think you can get around saving the expanded height yourself. WPF won't remember the user's manual height upon expanding once you've reverted back to SizeToContent="Height"
in your collapsed event handler.