Class
TimeSpanComponentBase

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:

cs-api-definition
public abstract class TimeSpanComponentBase : Freezable

Inheritance: objectTimeSpanComponentBase

Derived Classes: StepTimeSpanComponentBase

Constructors

TimeSpanComponentBase()

Declaration

cs-api-definition
protected TimeSpanComponentBase()

Fields

HeaderProperty

Identifies the Header dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HeaderProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

SelectedItemProperty

Identifies the SelectedItem dependency property.

Declaration

cs-api-definition
protected static readonly DependencyProperty SelectedItemProperty

Field Value

DependencyProperty

Properties

Header

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

Declaration

cs-api-definition
public string Header { get; set; }

Property Value

string

ItemsSource

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.

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

SelectedItem

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

Declaration

cs-api-definition
protected object SelectedItem { get; set; }

Property Value

object

Methods

GetSelectedIndexFromTimeSpan(long, long)

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

Declaration

cs-api-definition
public virtual int GetSelectedIndexFromTimeSpan(long originalTicks, long ticksLeftAfterSelection)

Parameters

originalTicks

long

The ticks corresponding for the original TimeSpan value.

ticksLeftAfterSelection

long

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

Returns

int

GetTicksFromItem(object)

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

Declaration

cs-api-definition
public abstract long GetTicksFromItem(object item)

Parameters

item

object

An item from the ItemsSource.

Returns

long

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

Events

SelectedItemChanged

Occurs when the SelectedItem property is changed.

Declaration

cs-api-definition
protected event EventHandler<TimeSpanComponentSelectedItemChangedEventArgs> SelectedItemChanged

Event Value

EventHandler<TimeSpanComponentSelectedItemChangedEventArgs>