On mobile devices, because the space is relatively small, such as the screen of a mobile phone, the complete Input Keyboard is not good or not beautiful. Therefore, the program needs to process the presentation of the keyboard, such as a Textbox Control, we only want to enter numbers, then if not processed, it will display the input interface of letters, which occupies space and is not very beautiful, therefore, we need to process the input operation.
In Windows Phone 7, we set the inputscope attribute of textbox to modify the keyboard input. See the following XAML code:
<Textbox Height = "72" horizontalalignment = "Left" margin = "104,43, 254 "name =" textbox1 "text =" "verticalalignment =" TOP "width =" "> <textbox. inputscope> <inputscopename namevalue = "digits"/> </inputscope> </textbox. inputscope> </textbox>
The namevalue value is used to set the keyboard display format. namevalue = "digits" indicates that the Input Keyboard is similar to the number. You can also set other formats, suchTime, Dateyear, etc. For other forms, you can go and have a look ..
(All Rights Reserved. For details, refer to the source)