Numeric Keyboard?
I have several instances in my application that I would prefer to use a numerical keyboard. Does one exist in WP7 and if s开发者_开发问答o, how would I go about popping that one up for a text box instead of the normal one?
You should use InputScope for the textBox
<TextBox Name="myTextBox" InputScope="Digits"/>
Here is the full list of InputScopes that are expected to be supported, based on the current enum names for InputScopeNameValue:
[NOTE] Even if you don't get the keyboard you want, you can still use it because it is highly possible to be supported in the future (final Mango probably)
http://www.imaginativeuniversal.com/blog/post/2010/07/06/WP7-InputScope.aspx
- AddressCity
- AddressCountryName
- AddressCountryShortName
- AddressStateOrProvince
- AddressStreet
- AlphanumericFullWidth
- AlphanumericHalfWidth
- ApplicationEnd
- Bopomofo
- Chat
- CurrencyAmount
- CurrencyAmountAndSymbol
- CurrencyChinese
- Date
- DateDay
- DateDayName
- DateMonth
- DateMonthName
- DateYear
- Default
- Digits
- EmailNameOrAddress
- EmailSmtpAddress
- EmailUserName
- EnumString
- FileName
- FullFilePath
- Hanja
- Hiragana
- KatakanaFullWidth
- KatakanaHalfWidth
- LogOnName
- Maps
- NameOrPhoneNumber
- Number
- NumberFullWidth
- OneChar
- Password
- PersonalFullName
- PersonalGivenName
- PersonalMiddleName
- PersonalNamePrefix
- PersonalNameSuffix
- PersonalSurname
- PhraseList
- PostalAddress
- PostalCode
- Private
- RegularExpression
- Search
- Srgs
- TelephoneAreaCode
- TelephoneCountryCode
- TelephoneLocalNumber
- TelephoneNumber
- Text
- Time
- TimeHour
- TimeMinorSec
- Url
- Xml
- Yomi
精彩评论