Deceleven
Deceleven

Reputation: 25

How to implement "Remember me" in a WPF application

I'm converting a WinForm app to WPF app and I'm stuck on the "Remember me" function on the login screen. I used to store the username and hashed password in registry using this: Application.UserAppDataRegistry.GetValue("MyAuth")

But it no longer works in WPF. Could anyone tell me how to access UserAppDataRegistry in WPF? Or what is the best way to do it?

Thanks in advance!

Upvotes: 2

Views: 4195

Answers (2)

matt
matt

Reputation: 1

You can also manually include a reference to System.Windows.Forms in the project references (and using statement if need) and then use what you were using. This however is not recommended depending on deployment since you may not have access to the registry. This is why IsolatedStorage and similar concepts came into being.

Upvotes: 0

Andrei Schneider
Andrei Schneider

Reputation: 3563

Try to use Isolated storage

Upvotes: 3

Related Questions