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
Reproduced in: https: //www.jianshu.com/p/f6be790729d8