Question

In a Windows Phone 8 App, is there a way to detect when the keyboard is closed for a TextBox? For instance, I have a TextBox control that I want to check the value of after editing is done. So the following question could also be similarly asked. Is there an event that the TextBox has that could be used to detect that editing has completed?

Was it helpful?

Solution

LostFocus event - the event which fires when your TextBox loses focus.

See more info in the official documentation, but it's basically very simple - use it like any other event handler.

If you need to know that the keyboard has been closed, make sure that no other input control received focus at the same time your TextBox lost it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top