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

Represents a control that allows the user to select TimeSpans.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
[TelerikToolboxCategory("Input")]
public class RadTimeSpanPicker : Control

Inheritance: objectRadTimeSpanPicker

Constructors

Initializes a new instance of the RadTimeSpanPicker class.

C#
public RadTimeSpanPicker()

Fields

DropDownWidthProperty

DependencyProperty

Identifies the DropDownWidth dependency property.

C#
public static readonly DependencyProperty DropDownWidthProperty

EditModeProperty

DependencyProperty

Identifies the EditMode dependency property.

C#
public static readonly DependencyProperty EditModeProperty

Identifies the GenerateDefaultComponents dependency property.

C#
public static readonly DependencyProperty GenerateDefaultComponentsProperty

IsDropDownOpenProperty

DependencyProperty

Identifies the IsDropDownOpen dependency property.

C#
public static readonly DependencyProperty IsDropDownOpenProperty

MaxDropDownHeightProperty

DependencyProperty

Identifies the MaxDropDownHeight dependency property.

C#
public static readonly DependencyProperty MaxDropDownHeightProperty

SpinModeProperty

DependencyProperty

Identifies the SpinMode dependency property.

C#
public static readonly DependencyProperty SpinModeProperty

StringFormatProperty

DependencyProperty

Identifies the StringFormat dependency property.

C#
public static readonly DependencyProperty StringFormatProperty

TabNavigationModeProperty

DependencyProperty

Identifies the TabNavigationMode dependency property.

C#
public static readonly DependencyProperty TabNavigationModeProperty

TextAlignmentProperty

DependencyProperty

Identifies the TextAlignment dependency property.

C#
public static readonly DependencyProperty TextAlignmentProperty

TimeSpanComponentsProperty

DependencyProperty

Identifies the TimeSpanComponents read-only dependency property.

C#
public static readonly DependencyProperty TimeSpanComponentsProperty

Identifies the TimeSpanComponentStyle dependency property.

C#
public static readonly DependencyProperty TimeSpanComponentStyleProperty

Identifies the TimeSpanComponentStyleSelector dependency property.

C#
public static readonly DependencyProperty TimeSpanComponentStyleSelectorProperty

TimeSpanTextProperty

DependencyProperty

Identifies the TimeSpanText dependency property.

C#
public static readonly DependencyProperty TimeSpanTextProperty

Identifies the TimeSpanWatermarkContent dependency property.

C#
public static readonly DependencyProperty TimeSpanWatermarkContentProperty

Identifies the TimeSpanWatermarkTemplate dependency property.

C#
public static readonly DependencyProperty TimeSpanWatermarkTemplateProperty

ValueProperty

DependencyProperty

Identifies the Value dependency property.

C#
public static readonly DependencyProperty ValueProperty

Properties

Gets or sets the width for a RadTimeSpanPicker DropDown.

C#
public double DropDownWidth { get; set; }

Gets or sets a value indicating the edit mode of the TimeSpanPicker control.

C#
public EditMode EditMode { get; set; }

Gets or sets a value that indicates whether the control will use the default - Day, Hour and Minute RadTimeSpanPickerComponents.

C#
public bool GenerateDefaultComponents { get; set; }

Gets or sets a value that indicates whether the DropDown button is open or closed.

C#
public bool IsDropDownOpen { get; set; }
Property Value:

True if this DropDown button is open; otherwise, false.

Gets or sets the maximum height for a RadTimeSpanPicker DropDown.

C#
public double MaxDropDownHeight { get; set; }

Gets or sets a value indicating the spin mode of the TimeSpanPicker control.

C#
public SpinMode SpinMode { get; set; }

Gets or sets a string that represents a valid format that can be used to format the string representation of any TimeSpan value.

C#
public string StringFormat { get; set; }

Gets or sets a value indicating the tab navigation mode of the TimeSpanPicker control.

C#
public TabNavigationMode TabNavigationMode { get; set; }

TextAlignment

TextAlignment

Gets or sets the TextAlignment of the TextBox inside the RadTimeSpanPicker.

C#
public TextAlignment TextAlignment { get; set; }
Property Value:

The TextAlignment of the TextBox.

Gets the TimeSpanComponentCollection that is currently used in the RadTimeSpanPicker.

C#
public TimeSpanComponentCollection TimeSpanComponents { get; }

Gets or sets the style for the RadTimeSpanPickerComponents of the RadTimeSpanPicker.

C#
public Style TimeSpanComponentStyle { get; set; }

Gets or sets the style selector for the RadTimeSpanPickerComponents of the RadTimeSpanPicker.

C#
public StyleSelector TimeSpanComponentStyleSelector { get; set; }

Gets the formatted string representing the Value.

C#
public string TimeSpanText { get; }

Gets or sets the content of the RadTimeSpanPicker control when there is no entered text.

C#
public object TimeSpanWatermarkContent { get; set; }

Gets or sets the System.Windows.DataTemplate used to display TimeSpanWatermark when there is no selection.

C#
public DataTemplate TimeSpanWatermarkTemplate { get; set; }

Gets or sets the Value of Telerik.Windows.Controls.RadTimeSpanPicker control.

C#
public TimeSpan? Value { get; set; }

Methods

Occurs when cut operation is executed.

C#
protected virtual void OnApplicationCut(object sender, ExecutedRoutedEventArgs e)
Parameters:senderobjecteExecutedRoutedEventArgs

Occurs when paste operation is performed.

C#
protected virtual void OnApplicationPaste(object sender, ExecutedRoutedEventArgs e)
Parameters:senderobjecteExecutedRoutedEventArgs

When overridden in a derived class, is invoked whenever application code or internal processes call .

C#
public override void OnApplyTemplate()

Create the TimeSpanPicker Automation Peer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Invoked whenever an unhandled System.Windows.UIElement.GotFocus event reaches this element in its route.

C#
protected override void OnGotFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Invoked when an unhandled System.Windows.Input.Keyboard.KeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

C#
protected override void OnKeyUp(KeyEventArgs e)
Parameters:eKeyEventArgs
C#
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters:eMouseWheelEventArgs

Occurs when the Value property is being changed after editing operation.

C#
protected virtual bool OnValueEditing(TimeSpan? newValue, EditSection section, decimal? oldSectionValue, char? digitChar = null, bool isDelete = false, SpinAction spinAction = SpinAction.None)
Parameters:newValueTimeSpan?

The new value to be set.

sectionEditSection

The section that is edited.

oldSectionValuedecimal?

The value of the section before edit.

digitCharchar?

The char to be inserted in the section.

isDeletebool

The char to be inserted in the section.

spinActionSpinAction

Indicates the spin action type.

Returns:

bool

Resets the theme.

C#
public void ResetTheme()

Events

DropDownClosed

RoutedEventHandler

Occurs when the DropDownButton is closed.

C#
public event RoutedEventHandler DropDownClosed

DropDownOpened

RoutedEventHandler

Occurs when the DropDownButton is opened.

C#
public event RoutedEventHandler DropDownOpened

Occurs when the Value property is changed.

C#
public event EventHandler<ValueChangedEventArgs> ValueChanged

Occurs when the Value property is about to change on edit operation via textbox or dropdown popup.

C#
public event EventHandler<ValueEditingEventArgs> ValueEditing