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:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control PartEditBoxBase<System.Nullable<System.DateTime>> DateTimeEditBox Object

Constructors

DateEditBox()

Initializes an instance of the DateEditBox class.

public DateEditBox()

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.

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

The text.

canCoerce System.Boolean

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

value System.Nullable<System.DateTime>

Returns the value for the specified text.

Returns

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