-
-
Notifications
You must be signed in to change notification settings - Fork 876
Fix PasswordBox various issues #1501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -123,12 +123,12 @@ public event RoutedEventHandler PasswordChanged | |||
protected override void OnTextChanged(TextChangedEventArgs e) | |||
{ | |||
UpdateTextContents(isTriggeredByTextInput: true); | |||
SetPlaceholderTextVisibility(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should always be called to ensure the placeholder/clear button is in sync with the text.
2nd commit centers the buttons vertically, same as TextBox, so they look largely identical again. |
<Thickness x:Key="PasswordBoxLeftIconMargin">10,8,0,0</Thickness> | ||
<Thickness x:Key="PasswordBoxRightIconMargin">0,8,10,0</Thickness> | ||
<Thickness x:Key="PasswordBoxButtonMargin">0,5,4,0</Thickness> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical to TextBox now (copied from there).
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
If you use a PasswordBox, and specify a default password (Password="Test" for example), or bind it to an existing password, the placeholder doesn't get removed and the clear button isn't updated.
What is the new behavior?
As one would expect.