how to set some default text at the passwordBox wpf? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Watermark TextBox in WPF May i know how to put some default texts in the password box in WPF? I use MSN messenger as an example. When its default, the password field will show the "password" in the Password Box. When i click and type on the password box, the "password" text will disappear and the dots will replace it. 回答1: You have to create a custom control to do that. XAML: <Window x:Class="WpfTest.Window1"