Greetings !!! :-)
Today's question:
How to return keyboard's input focus back to a TextBox which has been enabled again?
Greetings !!! :-)
Today's question:
How to return keyboard's input focus back to a TextBox which has been enabled again?
Could you please share more details about your scenario? Based on your words, I know that you want to make a TextBox focused. I'm confused about what you mean by return keyboard's input focus.
Ok, let's try this way:
I start my new app and write something into a TextBox, then I hit enter, disable that TextBox, calculate something with code, enable TextBox again, and I want to write something into our TextBox again withou clicking it with mouse - back to typing focus.
I hope this explains what I mean and THANKS!
xD
Hello,
Welcome to Microsoft Q&A!
Based on your scenario, you could just call the TextBox.Focus() Method to make the TextBox focus again. It's just a simple line of code and you could put it after you enable the TextBox.
For example:
MyTextBox.IsEnabled = true;
MyTextBox.Focus(FocusState.Programmatic);
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
5 people are following this question.