WPF Tab Key Navigation

后端 未结 4 859
轻奢々
轻奢々 2020-12-03 03:52

We have a WPF .NET 4.0 C# based application. We built our user interface from XML definitions (not XAML) but underneath we use a WPF to present the UI. That is at runtime, w

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 04:12

    You should try setting a KeyboardNavigation.TabNavigation attached property on either your Tree control, or the StackPanel derived control, in case you want your bottom buttons to also participate in a tab cycle:

    
     
     ...
     
    
    

    You can even combine a code-behind approach that you, I assume, is currently trying to use to control the tab behaviour inside the Tree control, with the KeyboardNavigation.TabNavigation to take care of the tabbing outside the tree control.

提交回复
热议问题