Storyboard DoubleAnimation Does not work with StackPanel Height Property

前端 未结 3 1710
渐次进展
渐次进展 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 03:09

    I figured it out myself. All I had to do was to Enable Dependent Animation (EnableDependentAnimation) on the DoubleAnimation as this animation affects the layout. And then it worked perfectly.

                            
                                
                                    
                                        
                                    
                                
                            
                            
                                
                                    
                                        
                                    
                                
                            
    

    Hope it saves someone some time!

提交回复
热议问题