Guido Magrin
Guido Magrin

Reputation: 551

WP8 - Automatically open keyboard on &123 option

while developing a new Windows Phone 8 software, I got stuck with this issue.

I'd need to open the keyboard straight to this view:

enter image description here

But all I can do is this (just giving focus to a text-box, that's easy enough!):

https://imageshack.com/i/0ytaa6j

Upvotes: 0

Views: 332

Answers (2)

Rana Hossain
Rana Hossain

Reputation: 415

Check this link for allowed scopes:

http://msdn.microsoft.com/en-us/library/system.windows.input.inputscopenamevalue%28VS.96%29.aspx

I believe the view you are after is called "Numeric Mode"; This following link has some images as well.

http://www.informit.com/articles/article.aspx?p=1706099&seqNum=2

Upvotes: 0

Jaihind
Jaihind

Reputation: 2778

Set the TextBox InputScope properties to Digits in your xaml code

<TextBox InputScope="Digits " Name="txtNumbers" />

and your code behind page use below line of code

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
   {
       txtNumbers.Focus();
   }

Upvotes: 1

Related Questions