"Flashing" (disappearing/reappearing) on-screen WP7 keyboard when calling Focus()
I am developing a chat client for Windows Phone 7, and am having a small problem with keeping focus on my text box used to enter messaged. I would like for the user to enter a message and then press a Send button, which (in addition to sending the message), calls chatTextbox.Focus() to put focus on the text box again, so the only interaction the user needs is "typing a message and pressing Send" without an intermediate "reselecting the text box."
This works fine when pressing Enter on the on-screen keyboard or a physical sliding keyboard (as I've mapped the Enter key to the same function the Send button calls), but when I use the Send button, it unfocuses the textbox and then quickly refocuses it -- the result is that the on-screen keyboard quickly disappears and reappears in a jarring way.
Is there a way to make it so that focus is never lost from the text box by pressing开发者_StackOverflow中文版 that Send button, or some other way to avoid this issue? Thank you.
精彩评论