Brush to Brush Animation

后端 未结 3 1431
夕颜
夕颜 2020-12-09 08:30

I managed to find out how to make a WPF animation - transition between two colors.

It\'s called ColorAnimation and works well.

ColorAnimation animati         


        
3条回答
  •  温柔的废话
    2020-12-09 09:10

    You just need to use the color animation on the gradient stops of the gradient brush. Here is an example that animates a rectangle gradient using a storyboard.

        
        
            
                
                    
                
                
                    
                
            
        
        
            
                
            
        
    
        
            
                
                    
                        
                        
                    
                
            
        
    
    

提交回复
热议问题