lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.03k stars 666 forks source link

fix: TextBox, NumberBox, PasswordBox Placeholder Not Working Properly. #1109

Closed textGamex closed 1 month ago

textGamex commented 1 month ago

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

Issue Number: #1043

What is the new behavior?

Other information

Added a new dependency property CurrentPlaceholderEnabledProperty.

textGamex commented 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.

textGamex commented 4 weeks ago

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