view password hidden under star

Editors for WPF Forum

Posted 11 years ago by Sasha
Version: 13.1.0583


I am using PasswordBox to get a password from user. I would like to know, if there is an oppotunity to show to the user entered password for some period of time in PasswordBox, and then hide it again ? For example - I've entered passord in PasswordBox and see stars. Then i push button "show entered password" and inPasswordBox I see not stars, but entered password, and after, for example 5 seconds, in PasswordBox will be stars again.

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Sasha,

Sorry but we don't have anything built-in for that at this time.  You would have to add some sort of custom button around the PasswordBox and then if pressed, render the password on top of the PasswordBox (probably with a solid background so it obscures the stars).

One thing that I would be concerned with is the security of doing this though.  PasswordBox is made so that the text being edited can't be scraped via a screen reader or other automation tool.  If a TextBlock was used to render the password to the user, that would be scrapable via one of those reader/automation tools.  I know Windows 8 now builds the sort of features you describe into native password boxes.  But they probably do it via something like a DrawingContext and not via TextBlock.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.