Shawn Wildermuth made a nice video about Tombstoning.
In this video he also provided some information about InputScope.
In this post I’ll focus on input scopes – and on input in wp7 general.
And I’ll compare it to the iPhone input (keyboard) handling.
First of all what’s this InputScope – in simple words – you can change the behavior of the on screen keyboard by setting this value on an input element (like a TextBox). For this post I’ll always use TextBoxes.
Focusing a TextBox brings up the Keyboard. Depending on the InputScope this Keyboard has different features.
For an example the value TelephoneNumber brings up a keyboard like this:
But InputScope does more – it also changes other behaviors like suggestions or capitalization.
Here an example which brings suggestions:
It is defined like this: <TextBox InputScope="Chat" />
The thing is beta and some things will hopefully change!
My favorite (to change) is Url 
Looks nice – maybe – lets check with the Microsoft windows phone 7 forum:
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series
First of all – we can discuss about the need for that big space in Url input.
I would say (maybe I’m wrong) spaces are not so often part of a Url.
So this space key could be smaller to make place for a much more important key the slash.
In the above Url we have 5 slashes – I guess this is worth an extra key.
For the domain you can “touch and hold” the button which brings up a (very short) list of other domains.
iPhone: here you get extra: .eu (yes Europe exists), .us and a “local domain” (like .de for my German iPhone).
Anyhow – domains are not so important – but the slash…
So lets hope this will change till RTM.
Now two words on the differences to the iPhone.
With the iPhone in general you as a developer are fully responsible for handling the keyboard.
There are also “styles” (keyboard layout) – but Correction, Capitalization and so on depend on the system settings, not on the “style”.
Although the keyboard comes up automatically when you focus a TextBox this is more or less everything you get.
The rest has to be done via delegates (in simple words you have to write a “keyboard handler”).
This is even needed for simple things like “dismiss the keyboard”. Tapping somewhere (not on a TextBox) removes the keyboard in wp7 – but not so on the iPhone.
Also you are responsible for situations where the keyboard overlays your content. There is no “auto-scroll into view” like with wp7.
But there are also positive aspects with the iPhone:
- Clear button
A settings which brings up a little button at the right side of a textbox which clears the content - Select text
Done with a nice magnifier and also (after you have a selection) “changeable” (drag start / end)
Further there is a “context menu” – “select all” and so on. - Clipboard support
Simply by tap and hold you can do copy (selected text), paste and so on
Anyhow – we have Silverlight – so we can build or own TextBox which has these features – and even more.
And (except for the Magnifier) it is not much work I guess.
2 Points are left – a short look at the keyboard in the WebBrowser control – and of course some code.
About the WebBrowser control – there is a lot to say – but here I’ll only talk about some “keyboard aspects”.
Working on a port of my RPS iPhone application I have a facebook login page – take a look:
Looks good?
No it does definitely not! At least compared to the iPhone!
On the iPhone I get – a “Next” and a “Previous” button on top of the keyboard.
Further I get a “Done” button which dismisses the keyboard (only important if I find no “free area” to tap).
And – much more important – instead of the return I get an “Open” button.
These “little helpers” enable fast an “Desktop like” input.
Enter email – tap next – enter password – tap open – done.
On wp7 – enter email.
Tap “somewhere” (if “auto-zoom” did work).
Tap password
Tap somewhere
Tap login
With the auto-zoom I mean a look like this:
Sometimes when you hit a textbox the WebBrowser brings this up close.
Anyhow – this is beta – so there is hope 
Last not least a piece of code to play with the InputScope values.
Create a windows phone 7 application.
In MainPage.xaml add the following to the content grid:
Snippet created with CBEnhancer <Grid x:Name="ContentGrid" Grid.Row="1"> <ListBox x:Name="lbScopes"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="200" /> <ColumnDefinition Width="270" /> </Grid.ColumnDefinitions> <TextBlock Text="{Binding}" VerticalAlignment="Center" /> <TextBox InputScope="{Binding}" Grid.Column="1" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> Further add a handler for the loaded event of the page.
Add this code to the handler:
Snippet created with CBEnhancer private void PhoneApplicationPage_Loaded(
object sender,
RoutedEventArgs e) {
List<
string> m_lE =
new List<
string>();
foreach(
FieldInfo fI
in typeof(
InputScopeNameValue).GetFields(
BindingFlags.Static |
BindingFlags.Public)){
m_lE.Add(fI.Name);
}
lbScopes.ItemsSource = m_lE;
}
This brings up a list with all available InputScope values. Simply scroll through the list, focus on of the TextBoxes and you can check what the keyboard does when you use the specific value.
Kudos to Shawn Wildermuth for his great videos and blog posts.
And I’m sure he would end a thing like this with: Makes sense? 
Manfred