WPF Trigger not null

前端 未结 3 618
深忆病人
深忆病人 2021-02-06 14:49

How to trigger an action in WPF when the Property is not null? This is a working solution when is null:

         


        
3条回答
  •  不要未来只要你来
    2021-02-06 15:28

    Unfortunately, you can't. But actually it's not necessary : you just need to specify the background for when the value is not null in the style setters, not in the trigger :

    
        
        
    
    
        
    
          
    
        
    
    

提交回复
热议问题