This is a migrated thread and some comments may be shown as answers.

Binding the Password (I know)

1 Answer 742 Views
PasswordBox
This is a migrated thread and some comments may be shown as answers.
ITC
Top achievements
Rank 1
ITC asked on 27 Mar 2017, 03:04 PM

Hi Telerik,

I know binding the password should not be done due to the password being in the RAM is bad practice.

Now everything I want is to let the database tell me if there even is a password (I'm NOT loading the password/password hash) so I can set the Variable I was planning on binding to some garbage text (eg. ********) so the user is visually informed there has been a password set before.

What is a way I can archive this?

BTW: What is best practice to use/get the actual password the user entered to store it? Your examples and documentation on this topic are - as often - paper thin.

Thanks a lot

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 29 Mar 2017, 08:16 AM
Hello Rolf,

You can bind to the Text property of the control - it will always contain the visible chars (not the actual password). You can always get the current password as string by using the Password property, or alternately you could get the password as SecureString by using the SecurePassword property.

Hope this helps.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PasswordBox
Asked by
ITC
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or