WPF-嵌套控件 按键事件顺序


    
        
            
                  
                
            
            
                
                
            
        
        

        
    



Grid_PreviewKeyDown_1
TextBlock_PreviewKeyDown_1
TextBlock_KeyDown_1
Grid_KeyDown_1
Grid_PreviewKeyUp_1
TextBlock_PreviewKeyUp_1
TextBlock_KeyUp_1
Grid_KeyUp_1


Grid_PreviewKeyDown_1里设置e.Handled = true后变为下面

Grid_PreviewKeyDown_1
Grid_PreviewKeyUp_1
TextBlock_PreviewKeyUp_1
TextBlock_KeyUp_1
Grid_KeyUp_1

你可能感兴趣的:(WPF)