[WPF] input box and Password boxes watermark Demo

15147010-495fe4c94088738a.png

textbox is empty, background text prompts, on the password box is different from the watermark text box, you can write a Brush to get, because the password box is no input can be used to determine non-empty-dependent properties,

    Below said about the implementation process

    1, a new class: PasswordBoxHelper.cs

15147010-438181b4b8a63fd1.png

Reproduced in: https: //www.jianshu.com/p/f6be790729d8

Guess you like

Origin blog.csdn.net/weixin_34122810/article/details/91310236