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

前端 未结 3 598
-上瘾入骨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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 08:58

    MouseDoubleClick is declared on Control so you just need an instance of some Control in your ItemTemplate. The simplest thing to do is use the base Control class which doesn't have any other behavior and just give it a customized template with what's in your ItemTemplate now.

    
        
            
                
                    
                        
                            
                                
                            
                        
                    
                
            
        
    
    

提交回复
热议问题