Class
RadDateTimePickerSpinEdit

Provides a spin edit behavior implementation for the RadDateTimePickerElement control, featuring up/down buttons for date/time value modification.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class RadDateTimePickerSpinEdit : RadDateTimePickerBehaviorDirector, IDisposable

Inheritance: objectRadDateTimePickerBehaviorDirectorRadDateTimePickerSpinEdit

Implements: IDisposable

Constructors

RadDateTimePickerSpinEdit(RadDateTimePickerElement)

Initializes a new instance of the RadDateTimePickerSpinEdit class with the specified date time picker element.

Declaration

cs-api-definition
public RadDateTimePickerSpinEdit(RadDateTimePickerElement dateTimePicker)

Parameters

dateTimePicker

RadDateTimePickerElement

The RadDateTimePickerElement instance to associate with this spin edit behavior.

Properties

ButtonsLayout

Gets the vertical stack layout element that contains the up and down arrow buttons for date/time value spinning.

Declaration

cs-api-definition
public StackLayoutElement ButtonsLayout { get; }

Property Value

StackLayoutElement

The StackLayoutElement containing the spin buttons arranged vertically.

ContentLayout

Gets the main content layout element that contains the checkbox, text box, and buttons in a horizontal arrangement.

Declaration

cs-api-definition
public StackLayoutElement ContentLayout { get; }

Property Value

StackLayoutElement

The StackLayoutElement that serves as the primary container for all spin edit components.

DateTimePickerElement

Gets the instance of RadDateTimePickerElement associated with this spin edit behavior control.

Declaration

cs-api-definition
[Browsable(false)]
public override RadDateTimePickerElement DateTimePickerElement { get; }

Property Value

RadDateTimePickerElement

Overrides RadDateTimePickerBehaviorDirector.DateTimePickerElement

TextBoxElement

Gets the masked edit box element that handles text input and formatting for the date time picker.

Declaration

cs-api-definition
public override RadMaskedEditBoxElement TextBoxElement { get; }

Property Value

RadMaskedEditBoxElement

The RadMaskedEditBoxElement instance used for text input.

Overrides RadDateTimePickerBehaviorDirector.TextBoxElement

Methods

CreateChildren()

Creates and initializes all child elements for the date time picker spin edit, including background, border, layout containers, checkbox, text box, and spin buttons.

Declaration

cs-api-definition
public override void CreateChildren()

Overrides RadDateTimePickerBehaviorDirector.CreateChildren()

Dispose()

Releases all resources used by the RadDateTimePickerSpinEdit by unsubscribing from event handlers to prevent memory leaks.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

SetDateByValue(DateTime?, DateTimePickerFormat)

Sets the date displayed in the text box using the specified date value and format type, applying culture-specific formatting.

Declaration

cs-api-definition
public override void SetDateByValue(DateTime? date, DateTimePickerFormat formatType)

Parameters

date

DateTime?

The nullable DateTime value to display, or null to show the null date representation.

formatType

DateTimePickerFormat

The DateTimePickerFormat specifying how the date should be formatted (Time, Short, Long, or Custom).

Overrides RadDateTimePickerBehaviorDirector.SetDateByValue(DateTime?, DateTimePickerFormat)