![]() Now, SetPassword is only ever called from the setter in the view-model, and then setting the caret to the beginning of the text is ideal. My current, working, but maybe slightly smelly, solution is to move the responsibility of setting the 'do-not-call' flag to the event handler: private bool _textChangedEventBusy Security fix: QuickPasswords now asks for the master password when copying multiple records. On the plus side, when youre entering that new password, PasswordBoxs password. Bug 26338 Login to website not working in Seamonkey 2.46. Private void PasswordTextOnPasswordChanged(object sender, RoutedEventArgs e)īut because SetPassword always reset suppressPasswordChanged in its finally, it would still always get called from PasswordTextOnPasswordChanged. PasswordBox may not capture the site until you actually log in with your newly-created credentials. My first and embarrassing attempt at preventing these methods calling each other was: private bool suppressPasswordChanged This ended up with SetPassword triggering PasswordTextOnPasswordChanged, which called the setter again, as it should normally, but not when recursively triggered by code. ((LoginFormPopup)View).SetPassword(_password.ToClearString()) Just be sure to remember your Master Key or you could be permanently locked out. ![]() Because your passwords are encrypted you won’t have to worry about online theft. Then I wanted to be able to set the Password property in the view-model, and had to add this view method: public void SetPassword(string password) PasswordBox is an excellent means of keeping all of your passwords in one place. I originally had this event handler: private void PasswordTextOnPasswordChanged(object sender, RoutedEventArgs e) public void SetPassword(string password)Ī PasswordBox has no data binding, and thus requires code in the view to update the view-model when the user types in that box. _suppressPasswordChanged is just to avoid triggering the PasswordTextOnPasswordChanged handler when I explicitly set the password. ((LoginFormViewModel)DataContext).Password = PasswordText.SecurePassword code-behind) I have: private void PasswordTextOnPasswordChanged(object sender, RoutedEventArgs e) What is going on here? It seems buggy to me that the caret doesn't follow ones typing.īehind the scenes (i.e. no typing involved, its content converts to the correct plain string. It is not the conversion code, for if I pre-populate the control with a password, i.e. when I type the password "123", the content of the PasswordBox, after conversion to a normal string, is "321". The problem with it is that the caret remains at the extreme left of its text box it doesn't move forward as you type, so the last character you type ends up the first character in the text box. I have a login view with a PasswordBox marked up as follows:
0 Comments
Leave a Reply. |