In Xaml TextBox with a Watermark that Disappears after First Iinput

前端 未结 4 1164
野趣味
野趣味 2021-01-06 08:57

In a TextBox provide a description that vanishes after the first input. This should provide a little help to the user what he should enter in the text field such as Watermar

4条回答
  •  天涯浪人
    2021-01-06 09:47

    Here's a XAML only solution, using rather basic "mechanisms".

    I'm in no way an expert on XAML. There are probably better and/or more elegant ways to do that, but this is what I got by trying and combining stuff I found on this site.

    I thought it is quite straight forward, explicit and this can be useful to some ...

    Feel free to comment on any issues or things that can be done better.

    
        
        
            
                
            
        
    
    

提交回复
热议问题