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

Expand and Collapse Timeline groups

Updated on Sep 24, 2025

This help topic will provide an overview of the methods for collapsing and expanding Timeline groups.

Expand All Groups at Start

You can expand all groups of items in the RadTimeline control, using an implicit Style Setter. For example:

XAML
	<Style TargetType="telerik:TimelineItemGroupControl" BasedOn="{StaticResource TimelineItemGroupControlStyle}">
	    <Setter Property="IsExpanded" Value="True" />
	</Style>

Expand A Group at Start

In case you want to expand a specific group initially, you can use a Converter. For example:

XAML
	<local:GroupKeyToIsExpandedConverter x:Key="groupKeyToIsExpandedConverter" />
	<sys:String x:Key="InitiallyExpandedGroup">Group2</sys:String>
	
	<Style TargetType="telerik:TimelineItemGroupControl" BasedOn="{StaticResource TimelineItemGroupControlStyle}">
	    <Setter Property="IsExpanded" Value="{Binding GroupKey, Converter={StaticResource groupKeyToIsExpandedConverter}, ConverterParameter={StaticResource InitiallyExpandedGroup}}" />
	</Style>
C#
	public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
	{
	    if (value != null && value is string)
	    {
	        string groupKey = (string)value;
	        string initiallyExpandedGroupKey = (string)parameter;
	
	        if (groupKey == initiallyExpandedGroupKey)
	        {
	            return true;
	        }
	    }
	
	    return false;
	}

Expand And Collapse Groups through binding (attached property)

There are scenarios, in which the expanded and collapsed state of the groups of timeline items depends on a certain condition In this case, you can use an attached behavior.

XAML
	<Style TargetType="telerik:TimelineItemGroupControl" BasedOn="{StaticResource TimelineItemGroupControlStyle}">
	    <Setter Property="local:TimelineItemGroupControlBehavior.ExpandedGroupKey" Value="{Binding SelectedItem.Group, ElementName=RadTimeline1}" />
	    <Setter Property="telerik:AnimationManager.IsAnimationEnabled" Value="False" />
	</Style>
C#
	public static readonly DependencyProperty ExpandedGroupKeyProperty = DependencyProperty.RegisterAttached("ExpandedGroupKey",
	    typeof(string), typeof(TimelineItemGroupControlBehavior), new PropertyMetadata(OnExpandedGroupKeyChanged));
	
	public static object GetExpandedGroupKey(DependencyObject obj)
	{
	    return (string)obj.GetValue(ExpandedGroupKeyProperty);
	}
	
	public static void SetExpandedGroupKey(DependencyObject obj, string value)
	{
	    obj.SetValue(ExpandedGroupKeyProperty, value);
	}
	
	private static void OnExpandedGroupKeyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
	{
	    TimelineItemGroupControl timelineGroup = sender as TimelineItemGroupControl;
	    if (timelineGroup == null || e.NewValue == null)
	        return;
	
	    timelineGroup.IsExpanded = string.Equals(timelineGroup.Header, (string)e.NewValue);
	}