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

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:

C#
public class RadDateTimePickerSpinEdit : RadDateTimePickerBehaviorDirector, IDisposable

Inheritance: objectRadDateTimePickerBehaviorDirectorRadDateTimePickerSpinEdit

Implements: IDisposable

Constructors

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

C#
public RadDateTimePickerSpinEdit(RadDateTimePickerElement dateTimePicker)
Parameters:dateTimePickerRadDateTimePickerElement

The RadDateTimePickerElement instance to associate with this spin edit behavior.

Properties

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

C#
public StackLayoutElement ButtonsLayout { get; }
Property Value:

The StackLayoutElement containing the spin buttons arranged vertically.

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

C#
public StackLayoutElement ContentLayout { get; }
Property Value:

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

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

C#
[Browsable(false)]
public override RadDateTimePickerElement DateTimePickerElement { get; }

Overrides: RadDateTimePickerBehaviorDirector.DateTimePickerElement

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

C#
public override RadMaskedEditBoxElement TextBoxElement { get; }
Property Value:

The RadMaskedEditBoxElement instance used for text input.

Overrides: RadDateTimePickerBehaviorDirector.TextBoxElement

Methods

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

C#
public override void CreateChildren()

Overrides: RadDateTimePickerBehaviorDirector.CreateChildren()

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

C#
public void Dispose()

Implements: IDisposable.Dispose()

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

C#
public override void SetDateByValue(DateTime? date, DateTimePickerFormat formatType)
Parameters:dateDateTime?

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

formatTypeDateTimePickerFormat

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

Overrides: RadDateTimePickerBehaviorDirector.SetDateByValue(DateTime?, DateTimePickerFormat)