I am using the AnimatedExpander with a content that is wider than the containing scroll viewer. So a horizontal scroll bar appears when I fill the content on expanding. When I collapse the AnimatedExpander the scroll bar doesn't change, as if the content was still visible. I believe that the AnimatedExpander retains its width even when collapsed.
I can evade this problem by binding the Visibility of the content to the IsExpanded of the AnimatedExpander.
Still I wonder if this is an issue of the AnimatedExpander or is there maybe a way to force the AnimatedExpander to use its Header for Width when it is not expanded?
<ScrollViewer HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <StackPanel> <shared:AnimatedExpander Header="myHeader"> <Grid ...
Any hints are most welcome.
[Modified 7 years ago]