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

Hide Empty Tooltips in SelectionBoxTemplate


Product Version 2019.3 1216
Product RadComboBox for WPF


How to show SelectionBox tooltip only when the tooltip has content.


To achieve the desired result, you can add a DataTrigger to set the Tooltip to null when the corresponding property is an empty string. For example, you can define the SelectionBoxTemplate as follows:

<DataTemplate x:Key="SelectionBoxTemplate"> 
    <TextBlock Text="{Binding Name}"> 
            <Style TargetType="TextBlock"> 
                <Setter Property="ToolTip" Value="{Binding Tooltip}" /> 
                    <DataTrigger Binding="{Binding Tooltip}" Value=""> 
                        <Setter Property="ToolTip" Value="{x:Null}" /> 

See Also

In this article