Does the GroupBox Header in WPF swallow mouse-clicks?

后端 未结 4 1278
抹茶落季
抹茶落季 2020-12-23 16:41

Have a look at this very simple example WPF program:



        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 17:18

    Ian Oakes answer stuffs up the tab order such that the header comes after the content. It's possible to modify the control template such that the border can't receive focus.

    To do this, modify the template so that the 2nd and 3rd borders (both in Grid Row 1) have IsHitTestVisible=false

    Complete template below

    
    
    
    

提交回复
热议问题