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

Represents a base class used as DataContext for a RadTimeSpanPickerComponent in the drop down part of the RadTimeSpanPicker.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
public abstract class TimeSpanComponentBase : Freezable

Inheritance: objectTimeSpanComponentBase

Derived Classes: StepTimeSpanComponentBase

Constructors

C#
protected TimeSpanComponentBase()

Fields

HeaderProperty

DependencyProperty

Identifies the Header dependency property.

C#
public static readonly DependencyProperty HeaderProperty

ItemsSourceProperty

DependencyProperty

Identifies the ItemsSource dependency property.

C#
public static readonly DependencyProperty ItemsSourceProperty

SelectedItemProperty

DependencyProperty

Identifies the SelectedItem dependency property.

C#
protected static readonly DependencyProperty SelectedItemProperty

Properties

Gets or sets a string that represents the title/header or the TimeSpanComponentBase.

C#
public string Header { get; set; }

Gets or sets a collection representing the available items to choose for the TimeSpanComponentBase. It is used to populate the Items in the RadListBox of a RadTimeSpanPickerComponent.

C#
public IEnumerable ItemsSource { get; set; }

Gets or sets the SelectedItem from the ItemsSource of the TimeSpanComponentBase.

C#
protected object SelectedItem { get; set; }

Methods

Returns the index of the item from the ItemsSource that should be selected for the TimeSpan from originalTicks.

C#
public virtual int GetSelectedIndexFromTimeSpan(long originalTicks, long ticksLeftAfterSelection)
Parameters:originalTickslong

The ticks corresponding for the original TimeSpan value.

ticksLeftAfterSelectionlong

The ticks left from the originalTicks after selection has been performed in the previous TimeSpanComponentBase

Returns:

int

Returns a long TimeSpan.Ticks value corresponding to an item from the ItemsSource.

C#
public abstract long GetTicksFromItem(object item)
Parameters:itemobject

An item from the ItemsSource.

Returns:

long

A long number that is the TimeSpan.Ticks representation of the item.

Events

Occurs when the SelectedItem property is changed.

C#
protected event EventHandler<TimeSpanComponentSelectedItemChangedEventArgs> SelectedItemChanged