开发者

Change input scope for Password text boxes on Windows Phone 7

How can you do the equivalent of changing the input scope on the password text boxes in WP7? They don't have an input scope field so I'm not sure how to do it.

I'd like to have a password box where you can only use 开发者_JAVA百科digits as your password, like the phone lock screen.

Thanks


There is no way to set the inputscope of the PasswordBox. If you really must do this you'll have to create your own control.

If making your own version of the phone lock screen I'd recommend looking at using a TextBlock and a number (12) of Buttons rather than a PasswordBox or TextBox.


Yes as Matt says, the easy thing to do would be to have the

textChanged events
keyUp event  
keyDown event

to manipulate the textbox.text property according to your requirement. This will be much easier than implementing a new control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜