I've got a WPF window with SizeToContent="Height". This window contains an <Expander /> that displays a list of recent activity. What I'd like is when the expander is expanded the window grows in size proportionally. When hidden the window again resizes proportionally. If the window is resized the expander and it's contained list view sh...
If i set sizetocontent to widthandheight, then WindowStartupLocation="CenterOwner" does not work properly. Instead of the center of the new window to be at the center of its parent owner, it looks more like the top left hand corner of the child window to be at the center of the parent.
If i remove sizetocontent then all is ok.
What is wr...
I have a window in my WPF application that is displayed on occasion. When it is shown it is faded in with an annimation, and when closed it is faded out. Nothing fancy, just a storyboard that modifies the opacity. Actually the window is never really closed, the opacity is just faded out to 0 where it remains until its to be displayed a...
I basically want certain parts of my window to not affect SizeToContent (things like a title bar) so that it appears to have no size and collapses. Is there a panel I can use to do this (like a ScrollViewer maybe?) or do I have to write my own?
...
In fact the UserControl lacks the property 'SizeToContent' that we have in Window.
So the question is:
what's the easiest and right way to simulate SizeToContent=WidthAndHeight behavior on UserControl?
UPD... yeah I know it suppose to get that automatically if no Height and Width defined in the container where you're placing a user c...