The InputScope
property determines the set of keys and layout provided on the SIP. This value allows you to provide the user with a specialized keyboard, particular to the data that is being entered.
The following code demonstrates how to change the default alphanumeric SIP to one containing telephone digits, suitable for allowing the user to enter a telephone number:
<TextBox InputScope="TelephoneNumber" />
The InputScope
is specified using one of the values from the InputScopeNameValue
enum (see Table 6.3).
Most of the InputScopeNameValue
enum values are mapped to a particular keyboard layout from Table 6.2.
Windows phone has built-in support for word prediction while the user is entering text into a TextBox
. To enable this feature, set the InputScope
to either Text or Chat, as shown in the following example:
<TextBox InputScope="Text" />
When populating the InputScope
property in XAML, you will notice that there is no IntelliSense support. This makes selecting the InputScopeNameValue
rather difficult, as there are quite a few of them. To regain IntelliSense, use the more verbose element syntax to specify the InputScope
property, like so:
<TextBox>
<TextBox.InputScope>
<InputScope>
<InputScopeName NameValue="TelephoneNumber" />
</InputScope>
</TextBox.InputScope>
</TextBox>
3.133.118.23