DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > How to Display Suggestions in ‘On-Screen Keyboard’ for a Textbox in Windows Phone App

How to Display Suggestions in ‘On-Screen Keyboard’ for a Textbox in Windows Phone App

Senthil Kumar user avatar by
Senthil Kumar
·
Apr. 14, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
3.50K Views

Join the DZone community and get the full member experience.

Join For Free

In the standard Windows Phone functions like messaging or Email App, when you enter a text, you will see the list of suggestions for the text you are typing in the top of the on-screen keyboard.


Similarly, we can display the suggestions for a textbox in the on-screen keyboard in our Windows Phone App, too, with the help of Input Scope (Chat or Text InputScopeName).

Just set the InputScope of the textbox to “Text” like this:

<TextBox Name="textBox1" Text="">

<TextBox.InputScope>

<InputScope >

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

</TextBox.InputScope>

</TextBox>

If you want to try this in codebehind , you can use the below C# code instead

InputScope inputScope = new InputScope();
InputScopeName inputName = new InputScopeName();
inputName.NameValue = InputScopeNameValue.Text;
inputScope.Names.Add(inputName);
textBox1.InputScope = inputScope;

Run the WP7 Application and start enter few characters in the textbox , you should see the suggestions now :)


 

Windows Phone app

Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Correlation Between Fast TTM and Containers
  • What Is High Cardinality?
  • PermGen and Metaspace
  • What Developers Need to Know About Table Partition Pruning

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo