Closed textGamex closed 1 month ago
I don't understand why the default value of PlaceholderEnabled is true, and when we assign true to it again, both Password and TextBox will be displayed at the same time.
In fact, when we set PlaceholderEnabled
from false to true, if Text
is empty, the PlaceholderText
will not be displayed immediately. It will only be shown after the OnTextChanged
event is triggered. A solution would be to add an OnPlaceholderEnabledChanged
event, which calls the SetPlaceholderTextVisibility
method when PlaceholderEnabled
is set from false
to true
.
I'm not sure if there is a better solution, or should we put this issue on hold for now, what do you think? @pomianowski
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Password
is set before settingPlaceholderEnabled
, bothPlaceholderText
andPassword
will appear simultaneously.PlaceholderEnabled
isfalse
andPlaceholderText
is not empty, clearing Text will still displayPlaceholderText
.Issue Number: #1043
What is the new behavior?
PlaceholderEnabled
is set tofalse
andPlaceholderText
is not empty, clearingText
will not displayPlaceholderText
.Other information
Added a new dependency property
CurrentPlaceholderEnabledProperty
.