Class TimeSpanComponentBase
Represents a base class used as DataContext for a RadTimeSpanPickerComponent in the drop down part of the RadTimeSpanPicker.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll
Syntax
public abstract class TimeSpanComponentBase : Freezable
Constructors
TimeSpanComponentBase()
Declaration
protected TimeSpanComponentBase()
Fields
HeaderProperty
Identifies the Header dependency property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
SelectedItemProperty
Identifies the SelectedItem dependency property.
Declaration
protected static readonly DependencyProperty SelectedItemProperty
Field Value
System.Windows.DependencyProperty
|
Properties
Header
Gets or sets a string that represents the title/header or the TimeSpanComponentBase.
Declaration
public string Header { get; set; }
Property Value
System.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
public IEnumerable ItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
|
SelectedItem
Gets or sets the SelectedItem from the ItemsSource of the TimeSpanComponentBase.
Declaration
protected object SelectedItem { get; set; }
Property Value
System.Object
|
Methods
GetSelectedIndexFromTimeSpan(Int64, Int64)
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
System.Int64
originalTicks
The ticks corresponding for the original TimeSpan value. |
System.Int64
ticksLeftAfterSelection
The ticks left from the originalTicks after selection has been performed in the previous TimeSpanComponentBase |
Returns
System.Int32
|
GetTicksFromItem(Object)
Returns a long System.TimeSpan.Ticks value corresponding to an item from the ItemsSource.
Declaration
public abstract long GetTicksFromItem(object item)
Parameters
System.Object
item
An item from the ItemsSource. |
Returns
System.Int64
A long number that is the System.TimeSpan.Ticks representation of the item. |
Events
SelectedItemChanged
Occurs when the SelectedItem property is changed.
Declaration
protected event EventHandler<TimeSpanComponentSelectedItemChangedEventArgs> SelectedItemChanged
Event Type
System.EventHandler<TimeSpanComponentSelectedItemChangedEventArgs>
|