In This Article

DatePicker Class

Represents a date picker.

[TemplatePart(Name = "PART_MonthCalendar", Type = typeof(MonthCalendar))]
public class DatePicker : PickerBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control PickerBase Object

Constructors

DatePicker()

Initializes an instance of the DatePicker class.

public DatePicker()

Properties

CanRetainTime

Gets or sets whether the various System.DateTime values can retain the time-portion, or if it is reset to midnight.

public bool CanRetainTime { get; set; }

Property Value

System.Boolean:

true if the various System.DateTime values can retain the time-portion; otherwise, false. The default value is false.

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

System.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

System.DateTime:

The highest possible value.

Minimum

Gets or sets the lowest possible value.

public DateTime Minimum { get; set; }

Property Value

System.DateTime:

The lowest possible value.

Value

Gets or sets the value of the control.

public DateTime? Value { get; set; }

Property Value

System.Nullable<System.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

System.EventHandler

ValueCommitted

Occurs after the Value is committed, either by pressing Enter or clicking on a date value.

public event EventHandler ValueCommitted

Event Type

System.EventHandler

Fields

CanRetainTimeProperty

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

public static readonly DependencyProperty CanRetainTimeProperty

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

  • PickerBase.OnCreateAutomationPeer()
  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods