The Wire Making Smartphones Smarter

23Feb/110

WP7 InputScope Tester

ChatInputScope

When developing a Windows Phone 7 app, you are going to use a TextBox control at some point. When you do, please set an InputScope value. This is one of the easiest ways to improve your user's experience, but it's amazing how many apps are released without using this feature. The InputScope changes the software keyboard and/or the behavior of the TextBox.

The InputScope shown to the left is "Chat", with the smilies selected.

As Shawn Wildermuth points out in his Ten Pet Peeves of WP7 Applications:

"... the default input scope on TextBox's do not offer AutoCorrect. So at a minimum changing the InputScope to Text will give the user auto-correct options. Using the case-specific InputScopes like EmailSmtpAddress, Chat, Number and FullName can help the user input data."

Setting the Input Scope is as easy as changing this XAML:

<TextBox x:Name="txtMyText" />

To This:

<TextBox x:Name="txtMyText" InputScope="Text" />

Wowee, AutoCorrect and Word Suggestions magically start working! This is an area that new developers seem to miss and can find difficult to implement (Intellisense only shows you the possible values if you use the long notation). You can find an example of the long notation and a list of InputScopes here.

Reading the Imaginative Universe blog linked above and using some of the code demonstrated, I wrote an app to help me see and use the various InputScopes. I will provide a link to the full project below.

The app binds a ListBox to the full list of InputScopes (and so will automatically include any additional InputScopes added in future releases). Select an InputScope from the list and then tap the TextBox to see it in action.  Pretty simple, but useful for exploring the various InputScopes.

The code is the property of WireBear, but you can feel free to use sections of it and to distribute this app (for free) with the WireBear name and link intact. Hopefully this helps you make more intuitive apps so that if nothing else, our experiences as users get improved!

Resources:

Bookmark and Share
Comments (0) Trackbacks (1)

Leave a comment

(required)