Wpf animate background color

前端 未结 8 2043
生来不讨喜
生来不讨喜 2020-11-30 02:41

I need help in taking right decision. I need to animate a background color of my user control when some event happens. When it is, I want to change the background just for 1

8条回答
  •  -上瘾入骨i
    2020-11-30 03:39

    This worked well for me.

    I have a path inside a button (it draws an "X"):

    
    

    On mouse over, I want the cross to go red, so I add:

    
        
        
            
                
                    
                        
                        
                        
                        
                    
                
            
        
    
        
        
            
                
                    
                        
                        
                    
                
            
        
    
    
    

    The most confusing thing about this is the brackets within Storyboard.TargetProperty. If you remove the brackets, nothing works.

    For more information, see "propertyName Grammar" and "Storyboard.TargetProperty".

提交回复
热议问题