Skip to content

Timeline2 displays a sequence of events along a vertical or horizontal bar. It supports progress state (active and completed items), icon or avatar markers, alternating layouts, and fully templated content.

Basic Usage ​

Bind ItemsSource to a list of Timeline2Entry objects. Each entry provides a date, title, description, and an optional marker icon.

xml
<dev:Timeline2 Width="384"
               ActiveIndex="2"
               ItemsSource="{x:Bind Entries}" />
csharp
public List<Timeline2Entry> Entries { get; } = new()
{
    new() { Date = "Mar 15, 2025", Title = "Project Kickoff", Icon = "\uE7C1", Description = "Kicked off the project with team alignment." },
    new() { Date = "Mar 22, 2025", Title = "Design Phase", Icon = "\uE790", Description = "User research and design workshops." },
    new() { Date = "Mar 29, 2025", Title = "Development Sprint", Icon = "\uE943", Description = "Frontend and backend development." },
    new() { Date = "Apr 5, 2025", Title = "Testing & Deployment", Icon = "\uE73E", Description = "QA testing and performance optimization." },
};

Items before ActiveIndex are completed, the item at ActiveIndex is active, and the rest are pending. With the default ActiveIndex of -1, no progress state is shown.

Size, Color and Kind ​

xml
<dev:Timeline2 Width="384"
               ActiveIndex="2"
               Color="Success"
               ItemsSource="{x:Bind Entries}"
               Size="XS" />

<dev:Timeline2 Width="384"
               ItemsSource="{x:Bind Entries}"
               Size="ThreeXS"
               Kind="Outline" />

Use MarkerShape to switch between Circle, RoundedSquare and Square. Set MarkerSize to override the size preset with an explicit value.

Alignment and Date Placement ​

Align controls which side of the bar the content sits on. DatePlacement moves the date out of the content and onto the opposite side of the bar.

xml
<dev:Timeline2 ActiveIndex="1"
               Align="Alternate"
               DatePlacement="Opposite"
               ItemsSource="{x:Bind Entries}" />

Horizontal ​

xml
<dev:Timeline2 ActiveIndex="2"
               ItemsSource="{x:Bind Entries}"
               Orientation="Horizontal" />

<dev:Timeline2 ActiveIndex="2"
               Align="Alternate"
               DatePlacement="Opposite"
               ItemsSource="{x:Bind Entries}"
               Orientation="Horizontal" />

A horizontal timeline divides the available width equally between its items.

Reverse ​

Reverse runs progress from the last item toward the first, so items after the active one are completed. It changes progress state only, not the order of the items.

xml
<dev:Timeline2 Width="384"
               ActiveIndex="1"
               ItemsSource="{x:Bind Entries}"
               Reverse="True" />

Active Item by Value ​

Set Timeline2Entry.Value to give an entry a key, then select it with ActiveValue. ActiveIndex and ActiveValue stay in sync. For items that are not Timeline2Entry, the item index is used as the value.

xml
<dev:Timeline2 ActiveValue="design" ItemsSource="{x:Bind Entries}" />

Clickable Items ​

Enable IsItemClickEnabled to make items interactive. Items then respond to tap, Enter and Space, show a hand cursor, and raise ItemClick. Set ActivateOnClick to make the clicked item the active item.

xml
<dev:Timeline2 Width="384"
               ActivateOnClick="True"
               ActiveValue="kickoff"
               IsItemClickEnabled="True"
               ItemClick="OnItemClick"
               ItemsSource="{x:Bind Entries}" />
csharp
private void OnItemClick(object sender, Timeline2ItemClickEventArgs e)
{
    if (e.Item is Timeline2Entry entry)
    {
        SelectionText.Text = $"Selected: {entry.Title}";
    }
}

Custom Templates ​

When you bind your own data type, set ItemTemplate for the main content, and optionally MarkerTemplate and OppositeTemplate. Each template receives the data item as its DataContext.

xml
<dev:Timeline2 Align="End" ItemsSource="{x:Bind Orders}">
    <dev:Timeline2.MarkerTemplate>
        <DataTemplate x:DataType="local:OrderEvent">
            <Grid Width="32" Height="32"
                  Background="{ThemeResource AccentFillColorDefaultBrush}"
                  CornerRadius="16">
                <FontIcon FontSize="14"
                          Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
                          Glyph="{x:Bind Icon}" />
            </Grid>
        </DataTemplate>
    </dev:Timeline2.MarkerTemplate>
    <dev:Timeline2.OppositeTemplate>
        <DataTemplate x:DataType="local:OrderEvent">
            <TextBlock Text="{x:Bind Date}" />
        </DataTemplate>
    </dev:Timeline2.OppositeTemplate>
    <dev:Timeline2.ItemTemplate>
        <DataTemplate x:DataType="local:OrderEvent">
            <TextBlock FontWeight="Medium" Text="{x:Bind Status}" />
        </DataTemplate>
    </dev:Timeline2.ItemTemplate>
</dev:Timeline2>

For Timeline2Entry data, you can replace individual parts instead of the whole item with DateTemplate, TitleTemplate and DescriptionTemplate. These are ignored when ItemTemplate is set.

xml
<dev:Timeline2 ItemsSource="{x:Bind Entries}" Size="XS">
    <dev:Timeline2.TitleTemplate>
        <DataTemplate x:DataType="dev:Timeline2Entry">
            <StackPanel Orientation="Horizontal" Spacing="6">
                <TextBlock Text="{x:Bind Title}" />
                <TextBlock FontWeight="Normal" Opacity="0.65" Text="{x:Bind Description}" />
            </StackPanel>
        </DataTemplate>
    </dev:Timeline2.TitleTemplate>
</dev:Timeline2>

Avatars ​

Set Timeline2Entry.Avatar or Timeline2Entry.AvatarUrl to show an image in the marker instead of an icon.

csharp
new Timeline2Entry { Title = "Jane joined", AvatarUrl = "https://example.com/jane.png" }

Timeline2 Properties ​

PropertyTypeDefaultDescription
ActiveIndexint-1Index of the active item. Items before it are completed. -1 means none.
ActiveValueobjectnullActive item selected by Timeline2Entry.Value.
ActivateOnClickboolfalseMakes the clicked item the active item.
AlignTimeline2AlignStartSide of the bar the content sits on.
BarSpacingdouble12Distance between the bar and the content.
ColorTimeline2ColorPrimaryDefault accent color.
DatePlacementTimeline2DatePlacementContentShows the date with the content or on the opposite side.
IsItemClickEnabledboolfalseMakes items interactive and raises ItemClick.
ItemSpacingdoubleNaNDistance between items. NaN derives it from the marker size.
MarkerShapeTimeline2MarkerShapeCircleDefault marker shape.
MarkerSizedoubleNaNExplicit marker size. NaN derives it from Size.
OrientationOrientationVerticalDirection of the bar.
ReverseboolfalseRuns progress from the last item toward the first.
SizeTimeline2SizeMDMarker size preset.
KindTimeline2KindSolidFilled or outlined markers.
MarkerTemplateDataTemplatenullReplaces the default marker.
OppositeTemplateDataTemplatenullContent on the opposite side of the bar.
DateTemplateDataTemplatenullTemplate for the date of a Timeline2Entry.
TitleTemplateDataTemplatenullTemplate for the title of a Timeline2Entry.
DescriptionTemplateDataTemplatenullTemplate for the description of a Timeline2Entry.

Timeline2 Events ​

EventDescription
ItemClickRaised when an item is clicked or invoked while IsItemClickEnabled is true. Timeline2ItemClickEventArgs provides Item and Index.

Timeline2Entry Properties ​

PropertyTypeDescription
DatestringDate text.
TitlestringTitle text.
DescriptionstringDescription text.
IconstringSegoe Fluent Icons glyph shown inside the marker.
AvatarImageSourceImage shown in the marker instead of an icon.
AvatarUrlstringAbsolute avatar URI. Ignored when Avatar is set.
ValueobjectKey used by ActiveValue. Falls back to the item index when null.
ColorTimeline2Color?Overrides Timeline2.Color for this entry.
ShapeTimeline2MarkerShape?Overrides Timeline2.MarkerShape for this entry.
TagobjectArbitrary data associated with the entry.

Enums ​

EnumValues
Timeline2SizeThreeXS, TwoXS, XS, SM, MD, LG, XL, TwoXL, ThreeXL
Timeline2ColorPrimary, Secondary, Success, Info, Warning, Error, Neutral
Timeline2AlignStart, End, Alternate
Timeline2KindSolid, Outline
Timeline2DatePlacementContent, Opposite
Timeline2MarkerShapeCircle, RoundedSquare, Square

Theming ​

Colors come from theme resources, so they follow light, dark and high contrast themes. Override any of these keys to restyle the control.

ResourceUsed for
Timeline2PrimaryBrushPrimary color
Timeline2SecondaryBrushSecondary color
Timeline2SuccessBrushSuccess color
Timeline2InfoBrushInfo color
Timeline2WarningBrushWarning color
Timeline2ErrorBrushError color
Timeline2NeutralBrushNeutral color
Timeline2OnColorBrushIcons on accent-colored markers
Timeline2OnNeutralBrushIcons on neutral markers
Timeline2ElevatedBrushPending markers and the uncompleted bar
Timeline2SurfaceBrushMarker background in the outline Kind
Timeline2HighlightedBrushTitles
Timeline2MutedBrushDescriptions
Timeline2DimmedBrushDates and opposite content

Accessibility ​

Each item is exposed to assistive technology as a list item named after the entry title, with its position in the set. When IsItemClickEnabled is true, items support the Invoke pattern and can be focused with the keyboard.

Timeline2

Demo ​

you can run demo and see this feature.

Released under the MIT License.