Watermark / hint text / placeholder TextBox

后端 未结 30 2940
遇见更好的自我
遇见更好的自我 2020-11-22 02:20

How can I put some text into a TextBox which is removed automatically when user types something in it?

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 02:32

    MahApps.Metro for WPF has a built-in watermark control, if you'd rather not roll your own. It's fairly straightforward to use.

     
                
                    I'm a watermark!
                
            
    

提交回复
热议问题