How do I switch to the overlay word "password" over the password field?

Do you know how in many WP7 applications you can "stroke" a text field to hint at what the user should insert into it? I want to do this with a password. This is pretty trivial with the text box, I just modify the get and set the focus events to handle everything correctly, but in the password box the text appears only as locked dots (except for the last character, which is a nice touch).

Is there any way to do this? I thought about putting a text box on top of the password window and hiding it under a tap or something like that, but it seems pretty ugly.

Update: I really like the PhoneTextBox control in the silverlight toolbox, but it has no password options. I am really looking for a PasswordBox with watermark features. But it turned out to be much harder to find than I had hoped.

+3
source share
4 answers

So, I finished this technique: http://damianblog.com/2011/01/21/wp7-password-watermark/

This is pretty much what was my first gut instinct, it's a bit cheesy, and someone who works on silverlight tools should definitely try to realize this someday.

+2
source
+5

Easy way, just download Silverlight for the Windows Phone Toolkit and use the PhoneTextBox control.

You can check the usage pattern for the control here !

+3
source

It may also suit your needs: -

http://watermarktextbox.codeplex.com/

+1
source

All Articles