Getting Started
This topic will walk you through the creating of RadTimeSpanPicker.
In order to use RadTimeSpanPicker in your project you have to add references to the following two assemblies:
- Telerik.Windows.Controls.dll
- Telerik.Windows.Controls.Input.dll
You can include the control in your page by either dragging it from the toolbox in Visual Studio, or manually creating the control. Below is an example of how to create RadTimeSpanPicker in XAML
Creating RadTimeSpanPicker
<telerik:RadTimeSpanPicker GenerateDefaultComponents="True"/>
Creating RadTimeSpanPicker in code
RadTimeSpanPicker timeSpanPicker = new RadTimeSpanPicker();
timeSpanPicker.GenerateDefaultComponents = true;
Dim timeSpanPicker As New RadTimeSpanPicker()
timeSpanPicker.GenerateDefaultComponents = True
By setting the GenerateDefaultComponents property to True the control will use the default components for hours, minutes and seconds. If you need to visualize some of the other built-in components or a custom component of your own you could add them as shown below to the TimeSpanComponents collection:
Adding TimeSpanComponents
<telerik:RadTimeSpanPicker>
<telerik:RadTimeSpanPicker.TimeSpanComponents>
<telerik:DayTimeSpanComponent/>
<telerik:HourTimeSpanComponent/>
<telerik:MinuteTimeSpanComponent/>
<telerik:SecondTimeSpanComponent/>
<telerik:MillisecondTimeSpanComponent/>
</telerik:RadTimeSpanPicker.TimeSpanComponents>
</telerik:RadTimeSpanPicker>