Watermark / hint text / placeholder TextBox

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

    Here's my approach Is great for MVVM where I also check if the Text box has focus, you can also use a regular trigger just for the text value as well the point is I just change the background Image when value changes:

                        
                            
                        
                    
    

提交回复
热议问题