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