In This Article

DateEditBox Class

Represents a date-only edit box.

[TemplatePart(Name = "PART_Picker", Type = typeof(DatePicker))]
public class DateEditBox : DateTimeEditBox, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control PartEditBoxBase<Nullable<DateTime>> DateTimeEditBox Object

Constructors

DateEditBox()

Initializes an instance of the DateEditBox class.

public DateEditBox()

Properties

CanRetainTime

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

public bool CanRetainTime { get; set; }

Property Value

Boolean:

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

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

ResetValue()

Resets the value to a default value.

protected override void ResetValue()

TryConvertFromString(String, Boolean, out Nullable<DateTime>)

Tries to convert the specified text to a value.

protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out DateTime? value)
Parameter Type Description
textToConvert String

The text.

canCoerce Boolean

Whether the returned value should be coerced to fall within the allowed value range.

value Nullable<DateTime>

Returns the value for the specified text.

Returns

Boolean:

true if the text was converted to a value successfully; otherwise, false.

Fields

CanRetainTimeProperty

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

public static readonly DependencyProperty CanRetainTimeProperty

Inherited Members

Extension Methods