Telerik UI for Windows Phone by Progress

This article explains how to use the ClearButton of RadTextBox.


The ClearButton is a RadImageButton. It appears when the end user starts typing in the text box and when it is tapped it deletes all the text and disappears again. When the ClearButton is tapped. The ClearButtonTap event is fired and the ClearButtonCommand is executed with the ClearButtonCommandParameter.


The ClearButton can be removed if it is not necessary for some reason. This happens by setting the ClearButtonVisibility property to Collapsed.


The style of the ClearButton can be easily modified with the ClearButtonStyle property. The new style should have a TargetType telerikPrimitives:RadImageButton

For example, here is how you can change the ClearButton's Foreground and add Background:

<telerikPrimitives:RadTextBox ActionButtonVisibility="Visible">
        <Style TargetType="telerikPrimitives:RadImageButton">
            <Setter Property="Foreground" Value="Yellow"/>
            <Setter Property="Background" Value="Aqua"/>

And here is the result:

Text Box-Features-Clear Button-01