Double-click event on WPF Window border

前端 未结 4 1548
天命终不由人
天命终不由人 2020-12-16 13:35

Is there any event which fires on double-click event on WPF Window border?

How I can catch it?

Thanks!

4条回答
  •  抹茶落季
    2020-12-16 14:10

    Sorry for being late to the party, but I'd like to suggest that you're better off with the first answer (by Jaster) to Why doesnt WPF border control have a mousedoubleclick event?.

    It's way more cleaner and doesn't even use one single line of code behind, hence it's fully MVVM-compliant and should be your way to go.

    
      
        
          
        
      
    
    

    Note: Of course, you have to replace YourBindableCommand with the appropriate command, probably provided by your ViewModel. If you need help on that, just let me know.

提交回复
热议问题