New to Telerik UI for WPF? Download free 30-day trial

Customize the TextBox

The appearance of the TextBox part of RadAutoSuggestBox can be customized via the TextBoxStyle property of the control.

The TextBoxStyle property expects a Style object with a TargetType set to RadWatermarkTextBox.

Example 1: Setting TextBoxStyle

<telerik:RadAutoSuggestBox Foreground="Red">     
    <telerik:RadAutoSuggestBox.TextBoxStyle> 
        <!-- The BasedOn property is required when using NoXaml dlls. Otherwise, remove the setting. --> 
        <Style TargetType="telerik:RadWatermarkTextBox" BasedOn="{StaticResource RadWatermarkTextBoxStyle}">                 
            <Setter Property="Opacity" Value="0.5" /> 
            <Setter Property="FontWeight" Value="Bold" />                     
        </Style> 
    </telerik:RadAutoSuggestBox.TextBoxStyle> 
</telerik:RadAutoSuggestBox> 
WPF RadAutoSuggestBox Custom TextBoxStyle

See Also

In this article