Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm having a really hard time with something that should be trivial. I just want to remove a few buttons from the tab order on a UserControl. I've tried adding IsTabStop="False" and KeyboardNavigation.IsTabStop="False" attributes to their xaml declarations, as well as setting myButton.IsTabStop = false; in the Loaded event handler for the UserControl. None of these additions had any effect, I could still tab to the controls I did this for.

Setting the TabIndex in the xaml works fine. The UserControl is being displayed in a WPFElementHost if that might make a difference. The other thought I had was that I might need to specify the TabIndex for all the other controls, but I haven't read that anywhere and I'd prefer to not state that explicitly if possible. Does anyone have a guess as to what might be going wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
545 views
Welcome To Ask or Share your Answers For Others

1 Answer

Try setting KeyboardNavigation.TabNavigation ="None" in the parent control.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...