Understanding InputScope with Silverlight on Windows Phone 7

March 23rd, 2010

Well…this is new to me. Maybe its not new to you, but I’ll gladly share anyhow.

I was watching a talk given at MIX by Mike Harsh on Building Windows Phone Applications with Silverlight and I was intrigued by his first demo where he showed the effects of applying an InputScope definition to a TextBox control and how it effected what implementation of the Soft Input Panel (sip or keyboard) was shown. InputScope has existed in the .NET Framework since v3.0 but I’ve never had cause to use it, or run across it for any purpose for that matter. After watching Mike’s presentation, I’ve come to the realization that all of us building Windows Phone apps will soon become very intimate with InputScope.

As opposed to spending my time writing up what I’ve learned, I decided to take a crack at producing a quick video walkthrough of InputScope, in its simplest form, as it relates to Silverlight for Windows Phone 7.

I highly recommend watching Mike’s talk as well as the Part 2 follow-up by Peter Torr to learn more about building Windows Phone 7 applications with Silverlight. Mike was kind enough to provide all of the source code for his demos as well as the slide deck over on his blog.

What other samples would you like to see? What questions do you have for building Windows Phone 7 apps with Silverlight?

  • http://www.slimcode.com/cs/blogs/martin/ Martin Plante

    I did a similar application to test InputScope myself, instead binding directly to a collection of InputScope. But I noticed that assigning one of the negative values of InputScopeNameValue, like PhraseList, to the NameValue of an InputScopeName was causing an OverflowException. So I tested your code, and indeed to causes the same error. Try selecting the PhraseList item in the ListBox. Do you think this is a bug in the framework?