Suppose I set MaxLength=3 for a textbox, when user input 3 char in this field, I want to the cursor move to next item.
It's default is user must hit Tab or use mouse to move the cursor to next field.
How to implement this request?
Suppose I set MaxLength=3 for a textbox, when user input 3 char in this field, I want to the cursor move to next item.
It's default is user must hit Tab or use mouse to move the cursor to next field.
How to implement this request?
There may be a more clever way but at first glance I would say a simple way would be to you add a
TextChanged
event to yourTextBox
and then when the number of characters hits the 3 you mention then set the focus to what you want.So if this is in your xaml:
Then in your code something like: