Edit this page

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

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"&gt;&#13;    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadTimeSpanPicker GenerateDefaultComponents="True"/>

You can also create RadTimeSpanPicker in code-behind:

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

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"&gt;&#13;    <Grid x:Name="LayoutRoot1" Background="White">

See Also