ClassTimeSpanComponentBase
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:
public abstract class TimeSpanComponentBase : Freezable
Inheritance: objectTimeSpanComponentBase
Derived Classes:
Constructors
TimeSpanComponentBase()
Declaration
protected TimeSpanComponentBase()
Fields
HeaderProperty
Identifies the Header dependency property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
DependencyProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
DependencyProperty
SelectedItemProperty
Identifies the SelectedItem dependency property.
Declaration
protected static readonly DependencyProperty SelectedItemProperty
Field Value
DependencyProperty
Properties
Header
Gets or sets a string that represents the title/header or the TimeSpanComponentBase.
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
public IEnumerable ItemsSource { get; set; }
Property Value
SelectedItem
Gets or sets the SelectedItem from the ItemsSource of the TimeSpanComponentBase.
Methods
GetSelectedIndexFromTimeSpan(long, long)
Returns the index of the item from the ItemsSource that should be selected for the TimeSpan from originalTicks.
Declaration
public virtual int GetSelectedIndexFromTimeSpan(long originalTicks, long ticksLeftAfterSelection)
Parameters
originalTicks
The ticks corresponding for the original TimeSpan value.
ticksLeftAfterSelection
The ticks left from the originalTicks after selection has been performed in the previous TimeSpanComponentBase
Returns
GetTicksFromItem(object)
Returns a long TimeSpan.Ticks value corresponding to an item from the ItemsSource.
Declaration
public abstract long GetTicksFromItem(object item)
Parameters
item
An item from the ItemsSource.
Returns
A long number that is the TimeSpan.Ticks representation of the item.
Events
SelectedItemChanged
Occurs when the SelectedItem property is changed.
Declaration
protected event EventHandler<TimeSpanComponentSelectedItemChangedEventArgs> SelectedItemChanged
Event Value