WindowsPhoneWatermarkTextBox is really simple to use.

First, include the WindowsPhoneWatermarkTextBoxControl.dll to your project.

In your XAML page, add the my namespace for WindowsPhoneWatermarkTextBoxControl like in the example below:

    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    d:DataContext="{d:DesignData SampleData/ViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"

   <!-- Your page -->


Then, you can had the control. The WatermarkText property is used to set the Watermark:

<my:WatermarkTextBox Name="watermarkTextBox" Width="456" Height="72" Margin="0,128,0,407" HorizontalAlignment="Left" WatermarkText="Enter a text..." />

You can easily access to both Text property and WatermarkText property:

this.watermarkTextBox.Text  // Get or set regular Text value
this.watermarkTextBox.WatermarkText  // Get ot set watermark


Last edited Mar 26, 2011 at 4:08 PM by arclightpsx, version 2


BrookYI Aug 8, 2014 at 3:49 AM 
"IsReadOnly" and "IsEnable" doesn't work.
it will crash.

ChrisSippel Mar 28, 2014 at 8:40 PM 
Works like a charm! Does exactly what it is supposed to do!

VijayDhas_MCA Dec 20, 2013 at 8:42 AM 
Hi.. I have download this sample project. But when i try to execute It shows Some error.
The error is

Error 1 Unable to load the metadata for assembly 'WindowsPhoneWatermarkTextBoxControl'. This assembly may have been downloaded from the web. See The following error was encountered during load: Could not load file or assembly 'WindowsPhoneWatermarkTextBoxControl, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x8013151)

What is have to do. Please don't mistake me. I am new to windows phone application development.

Mech0z Jan 8, 2012 at 7:48 PM 
Any way to clear the text field and then get the watermark text shown again?