Reputation: 63
I have a WPF TexBox and I would like to move focus two controls to the right on right arrow key. To move focus one element to the right I use:
this.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
But to move it two times I cannot find a solution.
Thanks, Kos
Upvotes: 2
Views: 554
Reputation: 50672
Why move twice? Isn't this just a sign that your tab order is wrong?
I'd fix the tab order. That way the tab key and right arrow key behave similarly.
Also: as a user I'd expect the right arrow key to move the carret inside the textbox, not away from the textbox. that is plainly confusing.
Upvotes: 2