Friday, June 6, 2014

Watermark effect on a TextBox in Windows Phone

You need to use PhoneTextBox from windows phone toolkit for this.
  1. You can download it from here.
  2. You can also directly add it to your project by typing the following into your package manager console :
    PM> Install-Package WPtoolkit
Now, add a reference of toolkit inside "phone:PhoneApplicationPage" tag in the xaml page as follows: xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
Finally, use PhoneTextBox control....
<toolkit:PhoneTextBox Hint="Username"/>

Hope it helps :)

No comments:

Post a Comment