Reputation: 9319
I have the following XAML snippet:
<TextBox MaxLength="3" Text="30" LostFocus="UpdateValue">
<TextBox.InputScope>
<InputScope >
<InputScopeName NameValue="Number" />
</InputScope>
</TextBox.InputScope>
</TextBox>
This causes a numeric keyboard to appear when clicked on, but to close it after manipulation, I have to annoyingly tap outside of it. Is there a way to make it include something like an enter button?
Upvotes: 2
Views: 1604
Reputation: 9478
I don't believe there is a InputScope for this but I can't check them right now. You probably have hence the question.
If there isn't an InputScope you could add an application bar with a single 'done' button. When the keyboard is displayed, display the application bar too. When the user hits the 'done' app bar button you can hide the keyboard by setting focus to the page.
Page.Focus();
Another option, A Numeric Input Control for Windows Phone 7.
Upvotes: 3