Why IsMouseOver is recognized and MouseDown isn't (Wpf Style trigger)?

后端 未结 3 2094
一整个雨季
一整个雨季 2020-12-16 16:34

Why IsMouseOver is recognized as a WPF style trigger and MouseDown isn\'t -given that both are valid UIElement properties as seen here-. First trigger works well but second

3条回答
  •  无人及你
    2020-12-16 17:22

    You can use MouseDown Event in Style.Triggers but you have to use an EventTrigger for that.

    
        
            
                ...
            
        
    
    

    And remember that

    the action will not be undone once the condition that raised the event is no longer true.

提交回复
热议问题