Windows Phone 7 adaptive keyboard input

Source: Internet
Author: User

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)

Related Article

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.