Freigeben über


InputScope changes in Windows Phone Mango

rifle scope

Recently I was working on my latest cut of dfRandomWinner and I noted that the behavior of InputScope="Digit" changed from Windows Phone 7.0 to Windows Phone "Mango". I couldn't actually find much documentation on the InputScope changes. Ok, now I'm curious. Which scopes had changed across all the possible InputScopeNameValue enumerations.  Of course, I'm not saying the documentation of the changes isn't out there, I just couldn't find it easily.

I wanted to do a side by side of all InputScopeNameValue rendering from 7.0 to the 7.1 (mango) SDK. For the comparison I really needed to look at 7.0 and 7.1 at the same time. I pulled the InputScope sample out of my Windows Phone Mango Tacklebox and ported it down to a Windows Phone 7.0 project. I then ran WP7MangoTacklebox on another machine and took eyeballed each InputScope in the list. Scientific? No.  But good enough for a blue collar coder like me.

My findings? Basically any pure numeric InputScope had changed to a new rendering that removed the alphanumeric keyboards and such. Much nicer.  If I just want numbers, why did I have to look at all the letters anyway.  InputScopeNameValue's I've verified have changed are Digits, CurrencyAmount ( but not CurrencyAmountAndSymbol ), DateDay, DateMonth, DateYear, NumericPassword, Time, TimeHour, and TimeMinorSec. All the InputScope's render as the Mango picture below.

Windows Phone 7.0 Windows Phone 7.0 Mango Windows Phone MANGO

Caveat: The InputScope limits the characters that can be typed in, but does not guarantee correctness. For example, you can use Digit, and still enter a number like "132.455.31223.1111". Be careful. There are 3rd party controls which can help you with better input control, or you can do you own validation on field exit to trap errors (exercise left to the reader).

More on InputScope, how to use it, and the possible enumerations can be found via the links in at https://dfwiki.devfish.net. Enjoy!

Comments

  • Anonymous
    January 05, 2012
    I've found Digit to be perfect for IP Address input just adding in after that then a validation on the ip address. Though it would be nice for them to have the "enter" key since it's rather helpful for the user to hit enter and cause focus to go to the next input.

  • Anonymous
    January 05, 2012
    Great point, appreciate the comment! I agree, I'd love to have an enter key.  I'd also like some of the scopes to be a bit more like regex.   Of course, user feedback and devfeedback they listen to.  Submit your suggestions via one of the feedback links in the Windows Phone section here - dfwiki.devfish.net/technology.Microsoft-feedback-routes.ashx .

  • Anonymous
    June 12, 2012
    The comment has been removed

  • Anonymous
    June 14, 2012
    re the german keyboard comment.  Go to my list of feedback routes to Microsoft (   dfwiki.devfish.net/technology.Microsoft-feedback-routes.ashx ). There are a couple you can use to pound on the Windows Phone team.   Let me know how it goes! And thanks for the comments. jhealy@microsoft.com