This project has moved and is read-only. For the latest updates, please go here.


Derives from Xceed.Wpf.Toolkit.AutoSelectTextBox

The WatermarkTextBox is simply a TextBox that allows you to specify an object, usually a String, to represent null or missing text.

Using Text


     <xctk:WatermarkTextBox Watermark="Enter First Name" />

Using an Image with Text

                <StackPanel Orientation="Horizontal">
                    <Image Source="Contact16.png" Stretch="None" />
                    <TextBlock Text="Enter First Name" Margin="4,0,0,0" />

Custom WatermarkTemplate

        <xctk:WatermarkTextBox Watermark="Enter First Name">
                    <Border BorderBrush="Green" BorderThickness="1">
                        <ContentControl Content="{Binding}" Foreground="DarkRed" FontWeight="Bold" Focusable="False" />


Property Description
AutoMoveFocus Gets or sets a value indicating if the focus can navigate in the appropriate flow direction (e.g., from one cell to another when a cell is being edited) when the cursor is at the beginning or end of the auto-select text box. (Inherited from AutoSelectTextBox)
AutoSelectBehavior Gets or sets a value indicating how the content of the auto-select text box is selected (Never or OnFocus). By default, Never. (Inherited from AutoSelectTextBox)
KeepWatermarkOnGotFocus Gets or sets if the Watermark will be displayed when the focus is set on the watermarkTextBox, when text is empty. Default is False.
Watermark Gets or sets the object to use in place of null or missing Text.
WatermarkTemplate Gets or sets the DataTemplate to use to display the Watermark.

Support this project, check out the Plus Edition.

Last edited Jun 1, 2016 at 3:53 PM by dlafontaine, version 13


BoucherS Jan 16, 2015 at 1:21 PM 
Issue has been created.

daxfohl Jan 15, 2015 at 8:51 PM 
Any way to have the watermark not disappear until the user starts typing? Many apps need to automatically focus a textbox when initially displaying a page, so the user will never see that watermark in the current implementation, which has it disappear immediately on focus.

BoucherS Sep 24, 2014 at 1:19 PM 
Please vote for it :

harshbollu Sep 24, 2014 at 6:27 AM 
Need a passwordbox like WatermarkTextBox

shenglingshi Jul 4, 2014 at 4:32 AM 
Need a passwordbox like WatermarkTextBox

BoucherS Nov 5, 2013 at 1:58 PM 
Please enter an issue in the issue panel.

sonhuytran Nov 5, 2013 at 11:20 AM 
Is there any possibility that I can set password character to this WatermarkTextBox ?

JakubPawlinski Jun 13, 2013 at 2:27 PM 
missing similar passwordbox :(

jogibear9988 Oct 23, 2011 at 8:20 PM 
Found a nice AutoComplete Textbox based on this Control: (it supports Phonetic algorithms)