Storyboard DoubleAnimation Does not work with StackPanel Height Property

前端 未结 3 1685
渐次进展
渐次进展 2021-01-13 02:16

I\'m trying to use DoubleAnimation to change the Height property of a StackPanel. The code does not throw any exception. But the animation does not work.

            


        
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 02:58

    The stack panel takes its height from the combined height of its contents. Setting the height explicitly has no meaning.

    You need to change the height/visibility of the stack panel's contents.

提交回复
热议问题