Watermark / hint text / placeholder TextBox

后端 未结 30 2527
遇见更好的自我
遇见更好的自我 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:35

    Here is the simplest solution:

                
                    
                    
                    
            
    

    This is a textbox with transparent backgound overlaying a label. The label's gray text is turned transparent by a data trigger that fires whenever the bound text is something other than empty string.

提交回复
热议问题