TimeSpanEditBox Class
Represents a timespan edit box.
public class TimeSpanEditBox : PartEditBoxBase<TimeSpan?>
- Inheritance:
- object Visual UIElement FrameworkElement Control PartEditBoxBase<TimeSpan?> object
Constructors
TimeSpanEditBox()
Initializes an instance of the class.
public TimeSpanEditBox()
Properties
DefaultValue
The value to set when incrementing/decrementing from a null value.
Format
The timespan format string.
HasPopupButtonWhenReadOnly
Indicates whether the control should display the popup button when the control is read-only.
protected override bool HasPopupButtonWhenReadOnly { get; }
Property Value
- bool:
trueif the control should display the popup button when the control is read-only; otherwise,false.
LargeChange
The large change value.
public TimeSpan LargeChange { get; set; }
Property Value
- TimeSpan:
The default value is
7.3:5:5:050.
Maximum
The highest possible value.
Minimum
The lowest possible value.
PickerEditableParts
The picker's editable parts.
ResolvedFormat
The resolved timespan format string.
SmallChange
The small change value.
Methods
CoerceValidValue(TimeSpan?)
Coerces the value to be within range.
protected override TimeSpan? CoerceValidValue(TimeSpan? value)
| Parameter | Type | Description |
|---|---|---|
| value | TimeSpan? | The value to coerce. |
Returns
- TimeSpan?:
The coerced value.
ConvertToString(TimeSpan?)
Converts the specified value to a string representation.
protected override string ConvertToString(TimeSpan? valueToConvert)
| Parameter | Type | Description |
|---|---|---|
| valueToConvert | TimeSpan? | The value. |
Returns
- string:
The string representation of the specified value.
CreateIncrementalChangeRequest(IncrementalChangeRequestKind)
Creates an incremental change (spin) request.
protected override IncrementalChangeRequest<TimeSpan?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
| Parameter | Type | Description |
|---|---|---|
| kind | IncrementalChangeRequestKind | The kind of request. |
Returns
- IncrementalChangeRequest<TimeSpan?>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
IsTextInputAllowed(string)
Indicates whether the input text is allowed if text input filtering is enabled.
protected override bool IsTextInputAllowed(string text)
| Parameter | Type | Description |
|---|---|---|
| text | string | The text to examine. |
Returns
- bool:
trueif the text input is allowed; otherwise,false.
See Also
IsValidValue(TimeSpan?)
Tests whether the specified value is valid.
protected override bool IsValidValue(TimeSpan? value)
| Parameter | Type | Description |
|---|---|---|
| value | TimeSpan? | The value to examine. |
Returns
- bool:
trueif the value is valid; otherwise,false.
ResetValue()
Resets the value to a default value.
protected override void ResetValue()
TryConvertFromString(string?, bool, out TimeSpan?)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string? textToConvert, bool canCoerce, out TimeSpan? value)
| Parameter | Type | Description |
|---|---|---|
| textToConvert | string | The text. |
| canCoerce | bool | Whether the returned value should be coerced to fall within the allowed value range. |
| value | TimeSpan? | Returns the value for the specified text. |
Returns
- bool:
trueif the text was converted to a value successfully; otherwise,false.
Fields
DefaultValueProperty
Defines the DefaultValue property.
public static readonly DependencyProperty DefaultValueProperty
FormatProperty
Defines the Format property.
public static readonly DependencyProperty FormatProperty
LargeChangeProperty
Defines the LargeChange property.
public static readonly DependencyProperty LargeChangeProperty
MaximumProperty
Defines the Maximum property.
public static readonly DependencyProperty MaximumProperty
MinimumProperty
Defines the Minimum property.
public static readonly DependencyProperty MinimumProperty
PickerEditablePartsProperty
Defines the PickerEditableParts property.
public static readonly DependencyProperty PickerEditablePartsProperty
ResolvedFormatProperty
Defines the ResolvedFormat property.
public static readonly DependencyProperty ResolvedFormatProperty
SmallChangeProperty
Defines the SmallChange property.
public static readonly DependencyProperty SmallChangeProperty
Inherited Members
- PartEditBoxBase<TimeSpan?>.ActivePartIndexProperty
- PartEditBoxBase<TimeSpan?>.CommitTriggersProperty
- PartEditBoxBase<TimeSpan?>.HasPopupProperty
- PartEditBoxBase<TimeSpan?>.InlinesProperty
- PartEditBoxBase<TimeSpan?>.InputScopeNameValueProperty
- PartEditBoxBase<TimeSpan?>.IntermediateValueProperty
- PartEditBoxBase<TimeSpan?>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<TimeSpan?>.IsEditableProperty
- PartEditBoxBase<TimeSpan?>.IsInputFilteringEnabledProperty
- PartEditBoxBase<TimeSpan?>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<TimeSpan?>.IsNullAllowedProperty
- PartEditBoxBase<TimeSpan?>.IsPopupButtonVisibleProperty
- PartEditBoxBase<TimeSpan?>.IsPopupOpenProperty
- PartEditBoxBase<TimeSpan?>.IsReadOnlyProperty
- PartEditBoxBase<TimeSpan?>.IsSpinnerVisibleProperty
- PartEditBoxBase<TimeSpan?>.IsUndoEnabledProperty
- PartEditBoxBase<TimeSpan?>.PlaceholderTextProperty
- PartEditBoxBase<TimeSpan?>.PopupBackgroundProperty
- PartEditBoxBase<TimeSpan?>.PopupBorderBrushProperty
- PartEditBoxBase<TimeSpan?>.PopupPickerStyleProperty
- PartEditBoxBase<TimeSpan?>.SpinnerVisibilityProperty
- PartEditBoxBase<TimeSpan?>.SpinWrappingProperty
- PartEditBoxBase<TimeSpan?>.TextAlignmentProperty
- PartEditBoxBase<TimeSpan?>.UsageContextProperty
- PartEditBoxBase<TimeSpan?>.ValueProperty
- PartEditBoxBase<TimeSpan?>.Commit()
- PartEditBoxBase<TimeSpan?>.Commit(bool)
- PartEditBoxBase<TimeSpan?>.InvalidateParts()
- PartEditBoxBase<TimeSpan?>.OnApplyTemplate()
- PartEditBoxBase<TimeSpan?>.OnCreateAutomationPeer()
- PartEditBoxBase<TimeSpan?>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<TimeSpan?>.OnIntermediateValueChanged(TimeSpan?, TimeSpan?)
- PartEditBoxBase<TimeSpan?>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<TimeSpan?>.OnIsNullAllowedChanged(bool, bool)
- PartEditBoxBase<TimeSpan?>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<TimeSpan?>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<TimeSpan?>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<TimeSpan?>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<TimeSpan?>.OnPopupOpened()
- PartEditBoxBase<TimeSpan?>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<TimeSpan?>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<TimeSpan?>.OnValueChanged(TimeSpan?, TimeSpan?)
- PartEditBoxBase<TimeSpan?>.ProcessTextInput(string)
- PartEditBoxBase<TimeSpan?>.SelectAll()
- PartEditBoxBase<TimeSpan?>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<TimeSpan?>.ActivePartIndex
- PartEditBoxBase<TimeSpan?>.CommitTriggers
- PartEditBoxBase<TimeSpan?>.CurrentSelectionLength
- PartEditBoxBase<TimeSpan?>.CurrentSelectionStartOffset
- PartEditBoxBase<TimeSpan?>.CurrentText
- PartEditBoxBase<TimeSpan?>.HasPopup
- PartEditBoxBase<TimeSpan?>.Inlines
- PartEditBoxBase<TimeSpan?>.InputScopeNameValue
- PartEditBoxBase<TimeSpan?>.IntermediateValue
- PartEditBoxBase<TimeSpan?>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<TimeSpan?>.IsEditable
- PartEditBoxBase<TimeSpan?>.IsInputFilteringEnabled
- PartEditBoxBase<TimeSpan?>.IsNonDefaultUsageContext
- PartEditBoxBase<TimeSpan?>.IsNullAllowed
- PartEditBoxBase<TimeSpan?>.IsPopupButtonVisible
- PartEditBoxBase<TimeSpan?>.IsPopupOpen
- PartEditBoxBase<TimeSpan?>.IsReadOnly
- PartEditBoxBase<TimeSpan?>.IsSpinnerVisible
- PartEditBoxBase<TimeSpan?>.IsUndoEnabled
- PartEditBoxBase<TimeSpan?>.Parts
- PartEditBoxBase<TimeSpan?>.PlaceholderText
- PartEditBoxBase<TimeSpan?>.PopupBackground
- PartEditBoxBase<TimeSpan?>.PopupBorderBrush
- PartEditBoxBase<TimeSpan?>.PopupPickerStyle
- PartEditBoxBase<TimeSpan?>.ResetValueCommand
- PartEditBoxBase<TimeSpan?>.SmallDecrementValueCommand
- PartEditBoxBase<TimeSpan?>.SmallIncrementValueCommand
- PartEditBoxBase<TimeSpan?>.SpinnerVisibility
- PartEditBoxBase<TimeSpan?>.SpinWrapping
- PartEditBoxBase<TimeSpan?>.TextAlignment
- PartEditBoxBase<TimeSpan?>.UsageContext
- PartEditBoxBase<TimeSpan?>.Value
- PartEditBoxBase<TimeSpan?>.ValueChanged