New to Telerik UI for WPFStart a free 30-day trial

Hide Empty Tooltips in SelectionBoxTemplate

Updated on Sep 15, 2025

Environment

Product Version2019.3 1216
ProductRadComboBox for WPF

Description

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

Solution

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:

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

See Also