Windows Phone keyboard Development

Source: Internet
Author: User
ArticleDirectory
    • Use the default keyboard
    • Enter a page and the keyboard is automatically displayed.
    • Chat keyboard
    • URL
    • Email
    • Name or phone number
    • Postaladdress
    • Phonenumber
Keyboard operation

Keyboard operation is simple, directCode

Use the default keyboard

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. Default; // <-- here

Scope. Names. Add (name );

 

Txtk1.inputscope = scope;

Enter a page and the keyboard is automatically displayed.

Protected override void onnavigatedto (system. Windows. Navigation. navigationeventargs E)

{

Base. onnavigatedto (E );

 

// This code opens up the keyboard when you navigate to the page.

Txtk1.updatelayout ();

Txtk1.focus ();

}

Chat keyboard

Contains a smiley = smily smile

// You can set the keyboard input scope by using either XAML or code.

// See The XAML file for the XAML version.

// The code version is below.

 

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. Chat; // <-- here

Scope. Names. Add (name );

 

Txtk2.inputscope = scope;

 

// To create keyboard 2, you can use any of the following input scopes.

//--------------------------------------------------------------------

// Chat

// Text

URL

. Com

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. url; // <-- here

Scope. Names. Add (name );

 

Txtk3.inputscope = scope;

Email

. COM and @ icons

// You can set the keyboard input scope by using either XAML or code.

// See The XAML file for the XAML version.

// The code version is below.

 

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. emailnameoraddress; // <-- here

Scope. Names. Add (name );

 

Txtk4.inputscope = scope;

 

// To create keyboard 4, you can use any of the following input scopes.

//--------------------------------------------------------------------

// Emailnameoraddress

// Emailsmtpaddress

// Emailusername

Name or phone number

Is to directly display the numeric keyboard (including123IconClickOn the keyboard)

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. nameorphonenumber; // <-- here

Scope. Names. Add (name );

 

Txtk5.inputscope = scope;

 

// To create keyboard 5, you can use any of the following input scopes.

//--------------------------------------------------------------------

// Nameorphonenumber

 

Postaladdress

The difference with the above is (display & 123 icon, click to show not only numbers but also some common punctuation marks)

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. postaladdress; // <-- here

Scope. Names. Add (name );

 

Txtk6.inputscope = scope;

 

// To create keyboard 6, you can use any of the following input scopes.

//--------------------------------------------------------------------

// Addressstreet

// Currencyamountandsymbol

// Currencychinese

// Postaladdress

// Postalcode

// Time

Phonenumber

Show numeric keypad

Inputscope scope = new inputscope ();

Inputscopename name = new inputscopename ();

 

Name. namevalue = inputscopenamevalue. telephonenumber; // <-- here

Scope. Names. Add (name );

 

Txtk7.inputscope = scope;

 

// To create keyboard 7, you can use any of the following input scopes.

//--------------------------------------------------------------------

// Telephoneareacode

// Telephonecountrycode

// Telephonelocalnumber

// Telephonenumber

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.