New to Telerik UI for WPF? Start a free 30-day trial
Add Clear Button to WatermarkTextBox
Updated on Sep 15, 2025
Environment
| Product Version | 2022.3.912 |
| Product | RadWatermarkTextBox for WPF |
Description
How to add a clear button to the RadWatermarkTextBox control.
Solution
You can add a button as the AdditionalContent of the RadWatermarkTextBox control and bind its Command property to the RadWatermarkTextBoxCommands.Clear command.
Add clear button as AdditionalContent
XAML
<telerik:RadWatermarkTextBox.AdditionalContent>
<telerik:RadButton Focusable="False" IsBackgroundVisible="False"
Command="telerik:RadWatermarkTextBoxCommands.Clear"
CommandTarget="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadWatermarkTextBox}}"
Visibility="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadWatermarkTextBox}, Path=Text, Converter={StaticResource NullToVisibilityConverter}}">
<telerik:RadGlyph Glyph="{StaticResource GlyphClose}"/>
</telerik:RadButton>
</telerik:RadWatermarkTextBox.AdditionalContent>