In This Article

DateTimePicker Class

Represents a date/time picker.

[TemplateVisualState(Name = "DateVisible", GroupName = "ComponentVisibilityStates")]
[TemplateVisualState(Name = "TimeVisible", GroupName = "ComponentVisibilityStates")]
public class DateTimePicker : PickerBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control PickerBase Object

Constructors

DateTimePicker()

Initializes an instance of the DateTimePicker class.

public DateTimePicker()

Properties

IsNullAllowed

Gets or sets a value indicating whether null values are allowed to be entered by the user.

public bool IsNullAllowed { get; set; }

Property Value

Boolean:

true if null values are allowed to be entered by the user; otherwise false. The default value is false.

Maximum

Gets or sets the highest possible value.

public DateTime Maximum { get; set; }

Property Value

DateTime:

The highest possible value.

Minimum

Gets or sets the lowest possible value.

public DateTime Minimum { get; set; }

Property Value

DateTime:

The lowest possible value.

Value

Gets or sets the value of the control.

public DateTime? Value { get; set; }

Property Value

Nullable<DateTime>:

The value of the control.

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

EventHandler

Fields

IsNullAllowedProperty

Identifies the IsNullAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsNullAllowedProperty

MaximumProperty

Identifies the Maximum dependency property. This field is read-only.

public static readonly DependencyProperty MaximumProperty

MinimumProperty

Identifies the Minimum dependency property. This field is read-only.

public static readonly DependencyProperty MinimumProperty

ValueProperty

Identifies the Value dependency property. This field is read-only.

public static readonly DependencyProperty ValueProperty

Inherited Members

Extension Methods