Skip to content

Latest commit

 

History

History
118 lines (85 loc) · 6.61 KB

getting-started.md

File metadata and controls

118 lines (85 loc) · 6.61 KB
title page_title description slug tags published position
Getting Started
Getting Started
Check our "Getting Started" documentation article for the RadTimeline {{ site.framework_name }} control.
radtimeline-getting-started
getting,started
true
1

Getting Started with {{ site.framework_name }} Timeline

This topic will walk you through the creating of RadTimeline.

Assembly References

In order to use RadTimeline control in your project you have to add references to the following assemblies:

  • Telerik.Licensing.Runtime
  • Telerik.Windows.Controls.dll
  • Telerik.Windows.Controls.DataVisualization.dll
  • Telerik.Windows.Data.dll

tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here]({%slug installing-license-key%}).

Adding Telerik Assemblies Using NuGet

To use RadTimeline when working with NuGet packages, install the Telerik.Windows.Controls.DataVisualization.for.Wpf.Xaml package. The [package name may vary]({%slug nuget-available-packages%}) slightly based on the Telerik dlls set - [Xaml or NoXaml]({%slug xaml-vs-noxaml%})

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package]({%slug nuget-installation%}) article.

Adding RadTimeline to the Project

You can include the control in your page by either dragging it from the toolbox in Visual Studio or manually creating the control. Example 1 demonstrate how to create RadTimeline in XAML.

[XAML] Example 1: Creating RadTimeline control

{{region xaml-radtimeline-getting-started_0}} <telerik:RadTimeline PeriodStart="2016/01/01" PeriodEnd="2016/06/01" VisiblePeriodStart="2016/01/01" VisiblePeriodEnd="2016/03/22" StartPath="Date" DurationPath="Duration"> telerik:RadTimeline.Intervals <telerik:MonthInterval /> <telerik:WeekInterval /> <telerik:DayInterval /> <telerik:HourInterval /> </telerik:RadTimeline.Intervals> </telerik:RadTimeline> {{endregion}}

Figure 1: RadTimeline visualization

{{ site.framework_name }} RadTimeline RadTimeline visualization

RadTimeline items

The RadTimeline control presents its data in two types of occurrences(events). The first one is a one-time occurrence which happens once in a time. The second type represents periodical occurrence. It requires a strict Start and End time to be presented.

Figure 2: RadTimeline items visualization

{{ site.framework_name }} RadTimeline RadTimeline items visualization

tip More information about how to populate the control with TimelineItems and TimelineInstantItems can be found in the [DataBinding help article]({%slug radtimeline-databinding%}) in our documentation.

Setting a Theme

The controls from our suite support different themes. You can see how to apply a theme different than the default one in the [Setting a Theme]({%slug styling-apperance-implicit-styles-overview%}) help article.

important Changing the theme using implicit styles will affect all controls that have styles defined in the merged resource dictionaries. This is applicable only for the controls in the scope in which the resources are merged.

To change the theme, you can follow the steps below:

  • Choose between the themes and add reference to the corresponding theme assembly (ex: Telerik.Windows.Themes.Windows8.dll). You can see the different themes applied in the Theming examples from our {% if site.site_name == 'WPF' %}WPF Controls Examples{% else %}Silverlight Controls Examples{% endif %} application.

  • Merge the ResourceDictionaries with the namespace required for the controls that you are using from the theme assembly. For the RadTimeline, you will need to merge the following resources:

    • Telerik.Windows.Controls
    • Telerik.Windows.Controls.DataVisualization

Example 2 demonstrates how to merge the ResourceDictionaries so that they are applied globally for the entire application.

[XAML] Example 2: Merge the ResourceDictionaries

{{region radtimeline-getting-started_7}} <Application.Resources> <ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries> </Application.Resources> {{endregion}}

Alternatively, you can use the theme of the control via the {% if site.site_name == 'WPF' %}StyleManager{% else %}StyleManager{% endif %}.

Figure 2 shows a RadTimeline with the Windows8 theme applied.

Figure 2: RadTimeline with the Windows8 theme

RadTimeline with Windows8 theme

{% if site.site_name == 'WPF' %}

Telerik UI for WPF Learning Resources

See Also

  • [Overview]({%slug radtimeline-overview%})
  • [MVVM Support]({%slug radtimeline-mvvm-support%})