Friday, March 14, 2014

Screen Masking for Windows Phone 8 Textbox Control

This is a pretty common theme on google.  Given the variety of explanations which were quite interesting and thorough but not exactly what I needed.  I finally reverted back to MSDN and found
what I was looking for.  the Textbox control in Silverlight supports a property called InputScopeNameValue.  This allows one to determine the keyboard layout of the SIP (software input panel).    One just sets the property to the desired setting to control input on the textbox.

<TextBox Text="HelloWorld">
    <TextBox.InputScope>
        <InputScope>
            <InputScopeName NameValue="Url" />
        </InputScope>
    </TextBox.InputScope>
</TextBox>

SIP layoutXAML or enumeration valueSIP description
DefaultDefault, and other standard input scope valuesStandard QWERTY layout
TextTextStandard layout with features such as autocorrect and text suggestion
WebUrlStandard layout with .com and customized Enter key for typing URLs.
E-mail addressEmailSmtpAddressStandard layout with .com and @ key.
E-mail name or addressEmailNameOrAddressStandard layout with .com and @ key, and easy access to phone number layout.
MapsMapsStandard layout with a customized Enter key. Used to type a location to search for on a map
Phone numberTelephoneNumber12-key layout
SearchSearchSemi-transparent layout with a Search and .com key.
SMS contactNameOrPhoneNumberStandard layout with access to phone number layout. Used to type in the SMS To field
ChatChatText input that uses intelligent features such as abbreviations

Source:http://msdn.microsoft.com/en-us/library/ff426929(v=vs.95).aspx

No comments:

Post a Comment