I was testing some code out for some one that was still in development. The code wasn't yet in complete form yet but even with that being said there was one thing that was annoying me about it. It wasn't taking advantage of InputScopes. To describe it breifly an input scope is a hint for the type of data that is to be entered into a text field. When the user gives focus to a text field the system will set the keyboard to the mode most appropriate for the type of data being entered. For numeric input scopes it will set the keyboard to numeric mode. For an e-mail input scope it will default to text and a key for the @ sign, and so on. For a full list of the input scopes you can see this page on MSDN.
Using InputScopes is easy. Within your XAML on the text boxes set the InputScope property to the name of the InputScope that specifies the type of data to be entered.
<TextBox InputScope="Number" />
<TextBox InputScope="EmailNameOrAddress" />
In addition to setting the input mode of the keyboard setting the InputScope also will let the system know whether or not to use its autocomplete dictionary. If you don't set the InputScope then it's up to the user to manually change the keyboard to the mode that is appropriate for what they are entering, and that can be down right annoying when there is a lot of text to enter!
Tags: Windows Phone, Development