Why doesn't WPF border control have a mousedoubleclick event?

前端 未结 3 592
-上瘾入骨i
-上瘾入骨i 2020-12-09 08:36

Why doesn\'t WPF border control have a mousedoubleclick event? I have a ItemsControl with some layout stuff in it for a DataTemplate. I want to handle the double click eve

3条回答
  •  轮回少年
    2020-12-09 09:10

    Update: Sorry, my bad - late hour

    Inside your mouse button down event get ClickCount

     //  e.Handled = true;  optional
    
     if (e.ClickCount > 1)
     {
        // here comes double click and more :)
     }
    

提交回复
热议问题