<xctk:WatermarkTextBox><xctk:WatermarkTextBox.Watermark><StackPanelOrientation="Horizontal"><ImageSource="Contact16.png"Stretch="None"/><TextBlockText="Enter First Name"Margin="4,0,0,0"/></StackPanel></xctk:WatermarkTextBox.Watermark></xctk:WatermarkTextBox>
The following example shows how to create a WatermarkTextBox that uses a custom WatermarkTemplate.
<xctk:WatermarkTextBoxWatermark="Enter First Name"><xctk:WatermarkTextBox.WatermarkTemplate><DataTemplate><BorderBorderBrush="Green"BorderThickness="1"><ContentControlContent="{Binding}"Foreground="DarkRed"FontWeight="Bold"Focusable="False"/></Border></DataTemplate></xctk:WatermarkTextBox.WatermarkTemplate></xctk:WatermarkTextBox>
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2