In This Article

TimeEditBox Class

Represents a time-only edit box.

public class TimeEditBox : 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

TimeEditBox()

Initializes an instance of the TimeEditBox class.

public TimeEditBox()

Properties

HasPopupButtonWhenReadOnly

Gets whether the control should display the popup button when the control is read-only.

protected override bool HasPopupButtonWhenReadOnly { get; }

Property Value

System.Boolean:

true if the control should display the popup button when the control is read-only; otherwise, false.

Methods

CoerceParsedValue(Nullable<DateTime>)

Coerces the parsed value from text, which is used for time-only edit boxes to ensure their date doesn't change.

protected override DateTime? CoerceParsedValue(DateTime? value)
Parameter Type Description
value System.Nullable<System.DateTime>

The value to coerce.

Returns

System.Nullable<System.DateTime>:

The coerced value.

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.

Inherited Members

Extension Methods