DatePicker Class
Represents a date picker.
[TemplatePart(Name = "PART_MonthCalendar", Type = typeof(MonthCalendar))]
public class DatePicker : PickerBase
- Inheritance:
- object Visual UIElement FrameworkElement Control PickerBase object
Constructors
DatePicker()
Initializes an instance of the class.
public DatePicker()
Properties
CanRetainTime
Indicates whether the various DateTime values can retain the time-portion, or if it is reset to midnight.
public bool CanRetainTime { get; set; }
Property Value
IsNullAllowed
Indicates whether null values are allowed to be entered by the user.
public bool IsNullAllowed { get; set; }
Property Value
- bool:
trueif null values are allowed to be entered by the user; otherwisefalse. The default value isfalse.
Maximum
The highest possible value.
Minimum
The lowest possible value.
Value
The value of the control.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
Events
ValueChanged
Occurs after the Value property value changes.
ValueCommitted
Occurs after the Value is committed, either by pressing Enter or clicking on a date value.
Fields
CanRetainTimeProperty
Defines the CanRetainTime property.
public static readonly DependencyProperty CanRetainTimeProperty
IsNullAllowedProperty
Defines the IsNullAllowed property.
public static readonly DependencyProperty IsNullAllowedProperty
MaximumProperty
Defines the Maximum property.
public static readonly DependencyProperty MaximumProperty
MinimumProperty
Defines the Minimum property.
public static readonly DependencyProperty MinimumProperty
ValueProperty
Defines the Value property.
public static readonly DependencyProperty ValueProperty