Stop WPF animation, storyboard begin in xaml but stopping it in codebehind?

后端 未结 3 572
北荒
北荒 2020-12-01 16:59

I created an animation storyboard in xaml file. That story board begins on Button.Click. But to stop the animation I am trying to stop storyboard on my custom event in code

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 17:46

    I am thankful for Timothy for giving nice Idea. Here I am posting my working code

       /*create this resources as global to that perticular xaml. Need not to be put it in App.xaml
         MyControl could be Window or Page or UserControl */
    
           
            
                
                
                
                
            
        
    
    /*  */
    
    /*     */
        
            
         
            
         
        
        

提交回复
热议问题