Learn Windows Phone7 development together (input control 13. 3)

Source: Internet
Author: User

In Phone7, there are actually two main input controls: textbox and password. These two controls, especially TextBox controls, have many new features.

1. PasswordBox: Password box control, which is used to input custom mask characters.

<PasswordBox Grid. row = "1" Height = "72" HorizontalAlignment = "Left" Margin = "12,284, 460 "Name =" passwordBox1 "verticalignment =" Top "Width =" "PasswordChar =" $ "/>

<PasswordBox Grid. row = "1" Height = "72" HorizontalAlignment = "Left" Margin = "12,119, 460" Name = "passwordBox2" verticalignment = "Top" Width = ""/>

<PasswordBox Grid. row = "1" Height = "72" HorizontalAlignment = "Left" Margin = "12,454, 460 "Name =" passwordBox3 "verticalignment =" Top "Width =" "PasswordChar =" @ "/>

PasswordChar: Set the display character of the password.

2. TextBox: control of the input box.

<TextBox Height = "72" HorizontalAlignment = "Left" Margin = "11,42, 460 "Name =" textBox1 "verticalignment =" Top "Width =" "SelectionBackground =" Red "SelectionForeground =" Green "InputScope =" Text "/>

Text: set or obtain the Text to be entered.

IsReadOnly: Set whether input is allowed.

SelectionBackground: sets the background color of the selected text in the input box.

SelectionForground: Set the font color of the selected text in the input box.

SelectedText: Get the selected text in the input box. It can be used in the SelectionChanged event.

InputScope: allows the keyboard to have different key-plane effects for easy input.

You can also set it as follows:

<TextBox. InputScope>

<InputScope>

<InputScopeName NameValue = "Text"> </InputScopeName>

</InputScope>

</TextBox. InputScope>

 

The following lists the scopes supported by this attribute:

1. AddressCity
2. AddressCountryName
3. AddressCountryShortName
4. AddressStateOrProvince
5. AddressStreet
6. AlphanumericFullWidth
7. AlphanumericHalfWidth
8. ApplicationEnd
9. Bopomofo
10. Chat
11. CurrencyAmount
12. CurrencyAmountAndSymbol
13. CurrencyChinese
14. Date
15. DateDay
16. DateDayName
17. DateMonth
18. DateMonthName
19. DateYear
20. Default
21. Digits
22. EmailNameOrAddress
23. EmailSmtpAddress
24. EmailUserName
25. EnumString
26. FileName
27. FullFilePath
28. Hanja
29. Hiragana
30. KatakanaFullWidth
31. KatakanaHalfWidth
32. LogOnName
33. Maps
34. NameOrPhoneNumber
35. Number
36. NumberFullWidth
37. OneChar
38. Password
39. PersonalFullName
40. PersonalGivenName
41. PersonalMiddleName
42. PersonalNamePrefix
43. PersonalNameSuffix
44. PersonalSurname
45. PhraseList
46. PostalAddress
47. PostalCode
48. Private
49. RegularExpression
50. Search
51. Srgs
52. TelephoneAreaCode
53. TelephoneCountryCode
54. TelephoneLocalNumber
55. TelephoneNumber
56. Text
57. Time
58. TimeHour
59. TimeMinorSec
60. Url
61. Xml
62. Yomi

The above list can be obtained through code:

FieldInfo [] array = typeof (InputScopeNameValue). GetFields (BindingFlags. Public | BindingFlags. Static );

 

Text: Lenovo input added to the keyboard

 

TelephoneNumber: the keys and planes are displayed as numbers.

 

Url: the key area shows. com.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.