RectEditBox Class
Represents a Rect edit box.
public class RectEditBox : PartEditBoxBase<Rect?>
- Inheritance:
- object Visual UIElement FrameworkElement Control PartEditBoxBase<Rect?> object
Constructors
RectEditBox()
Initializes an instance of the class.
public RectEditBox()
Properties
DefaultValue
The value to set when incrementing/decrementing from a null value.
public Rect DefaultValue { get; set; }
Property Value
- Rect:
The default value is
0.
Format
The number format string.
public string Format { get; set; }
Property Value
- string:
The default value is
"G".
Remarks
This value can be defined as a numeric (e.g., "G") or composite (e.g., "{0:G}") format string.
IsNaNAllowed
Indicates whether NaN is accepted as a component value.
public bool IsNaNAllowed { get; set; }
Property Value
IsNegativeInfinityAllowed
Indicates whether NegativeInfinity is accepted as a component value.
public bool IsNegativeInfinityAllowed { get; set; }
Property Value
- bool:
trueif NegativeInfinity is accepted as a component value; otherwise,false. The default value isfalse.
IsPositiveInfinityAllowed
Indicates whether PositiveInfinity is accepted as a component value.
public bool IsPositiveInfinityAllowed { get; set; }
Property Value
- bool:
trueif PositiveInfinity is accepted as a component value; otherwise,false. The default value isfalse.
LargeChange
The large change value.
public Rect LargeChange { get; set; }
Property Value
- Rect:
The default value is
5.0.
Maximum
The highest possible value.
public Rect Maximum { get; set; }
Property Value
- Rect
Minimum
The lowest possible value.
public Rect Minimum { get; set; }
Property Value
- Rect
ResolvedFormat
The resolved number format string.
RoundingDecimalPlace
The rounding decimal place, which is a value between 0 and 15.
public int? RoundingDecimalPlace { get; set; }
Property Value
- int?:
Pass a
nullvalue to disable rounding. The default value is8.
SmallChange
The small change value.
public Rect SmallChange { get; set; }
Property Value
- Rect:
The default value is
1.0.
Methods
CoerceValidValue(Rect?)
Coerces the value to be within range.
protected override Rect? CoerceValidValue(Rect? value)
| Parameter | Type | Description |
|---|---|---|
| value | Rect? | The value to coerce. |
Returns
- Rect?:
The coerced value.
ConvertToString(Rect?)
Converts the specified value to a string representation.
protected override string ConvertToString(Rect? valueToConvert)
| Parameter | Type | Description |
|---|---|---|
| valueToConvert | Rect? | The value. |
Returns
- string:
The string representation of the specified value.
CreateIncrementalChangeRequest(IncrementalChangeRequestKind)
Creates an incremental change (spin) request.
protected override IncrementalChangeRequest<Rect?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
| Parameter | Type | Description |
|---|---|---|
| kind | IncrementalChangeRequestKind | The kind of request. |
Returns
- IncrementalChangeRequest<Rect?>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
IsValidValue(Rect?)
Tests whether the specified value is valid.
protected override bool IsValidValue(Rect? value)
| Parameter | Type | Description |
|---|---|---|
| value | Rect? | The value to examine. |
Returns
- bool:
trueif the value is valid; otherwise,false.
ProcessTextInput(string)
Processes typed text.
protected override bool ProcessTextInput(string text)
| Parameter | Type | Description |
|---|---|---|
| text | string | The typed text. |
Returns
- bool:
trueif the typed text was handled and should not be allowed to be entered; otherwise,false.
ResetValue()
Resets the value to a default value.
protected override void ResetValue()
TryConvertFromString(string?, bool, out Rect??)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string? textToConvert, bool canCoerce, out Rect?? 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 | Rect? | 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
IsNaNAllowedProperty
Defines the IsNaNAllowed property.
public static readonly DependencyProperty IsNaNAllowedProperty
IsNegativeInfinityAllowedProperty
Defines the IsNegativeInfinityAllowed property.
public static readonly DependencyProperty IsNegativeInfinityAllowedProperty
IsPositiveInfinityAllowedProperty
Defines the IsPositiveInfinityAllowed property.
public static readonly DependencyProperty IsPositiveInfinityAllowedProperty
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
ResolvedFormatProperty
Defines the ResolvedFormat property.
public static readonly DependencyProperty ResolvedFormatProperty
RoundingDecimalPlaceProperty
Defines the RoundingDecimalPlace property.
public static readonly DependencyProperty RoundingDecimalPlaceProperty
SmallChangeProperty
Defines the SmallChange property.
public static readonly DependencyProperty SmallChangeProperty
Inherited Members
- PartEditBoxBase<Rect?>.ActivePartIndexProperty
- PartEditBoxBase<Rect?>.CommitTriggersProperty
- PartEditBoxBase<Rect?>.HasPopupProperty
- PartEditBoxBase<Rect?>.InlinesProperty
- PartEditBoxBase<Rect?>.InputScopeNameValueProperty
- PartEditBoxBase<Rect?>.IntermediateValueProperty
- PartEditBoxBase<Rect?>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<Rect?>.IsEditableProperty
- PartEditBoxBase<Rect?>.IsInputFilteringEnabledProperty
- PartEditBoxBase<Rect?>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<Rect?>.IsNullAllowedProperty
- PartEditBoxBase<Rect?>.IsPopupButtonVisibleProperty
- PartEditBoxBase<Rect?>.IsPopupOpenProperty
- PartEditBoxBase<Rect?>.IsReadOnlyProperty
- PartEditBoxBase<Rect?>.IsSpinnerVisibleProperty
- PartEditBoxBase<Rect?>.IsUndoEnabledProperty
- PartEditBoxBase<Rect?>.PlaceholderTextProperty
- PartEditBoxBase<Rect?>.PopupBackgroundProperty
- PartEditBoxBase<Rect?>.PopupBorderBrushProperty
- PartEditBoxBase<Rect?>.PopupPickerStyleProperty
- PartEditBoxBase<Rect?>.SpinnerVisibilityProperty
- PartEditBoxBase<Rect?>.SpinWrappingProperty
- PartEditBoxBase<Rect?>.TextAlignmentProperty
- PartEditBoxBase<Rect?>.UsageContextProperty
- PartEditBoxBase<Rect?>.ValueProperty
- PartEditBoxBase<Rect?>.Commit()
- PartEditBoxBase<Rect?>.Commit(bool)
- PartEditBoxBase<Rect?>.InvalidateParts()
- PartEditBoxBase<Rect?>.IsTextInputAllowed(string)
- PartEditBoxBase<Rect?>.OnApplyTemplate()
- PartEditBoxBase<Rect?>.OnCreateAutomationPeer()
- PartEditBoxBase<Rect?>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<Rect?>.OnIntermediateValueChanged(Rect?, Rect?)
- PartEditBoxBase<Rect?>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<Rect?>.OnIsNullAllowedChanged(bool, bool)
- PartEditBoxBase<Rect?>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<Rect?>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<Rect?>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<Rect?>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<Rect?>.OnPopupOpened()
- PartEditBoxBase<Rect?>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<Rect?>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<Rect?>.OnValueChanged(Rect?, Rect?)
- PartEditBoxBase<Rect?>.SelectAll()
- PartEditBoxBase<Rect?>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<Rect?>.ActivePartIndex
- PartEditBoxBase<Rect?>.CommitTriggers
- PartEditBoxBase<Rect?>.CurrentSelectionLength
- PartEditBoxBase<Rect?>.CurrentSelectionStartOffset
- PartEditBoxBase<Rect?>.CurrentText
- PartEditBoxBase<Rect?>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<Rect?>.HasPopup
- PartEditBoxBase<Rect?>.Inlines
- PartEditBoxBase<Rect?>.InputScopeNameValue
- PartEditBoxBase<Rect?>.IntermediateValue
- PartEditBoxBase<Rect?>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<Rect?>.IsEditable
- PartEditBoxBase<Rect?>.IsInputFilteringEnabled
- PartEditBoxBase<Rect?>.IsNonDefaultUsageContext
- PartEditBoxBase<Rect?>.IsNullAllowed
- PartEditBoxBase<Rect?>.IsPopupButtonVisible
- PartEditBoxBase<Rect?>.IsPopupOpen
- PartEditBoxBase<Rect?>.IsReadOnly
- PartEditBoxBase<Rect?>.IsSpinnerVisible
- PartEditBoxBase<Rect?>.IsUndoEnabled
- PartEditBoxBase<Rect?>.Parts
- PartEditBoxBase<Rect?>.PlaceholderText
- PartEditBoxBase<Rect?>.PopupBackground
- PartEditBoxBase<Rect?>.PopupBorderBrush
- PartEditBoxBase<Rect?>.PopupPickerStyle
- PartEditBoxBase<Rect?>.ResetValueCommand
- PartEditBoxBase<Rect?>.SmallDecrementValueCommand
- PartEditBoxBase<Rect?>.SmallIncrementValueCommand
- PartEditBoxBase<Rect?>.SpinnerVisibility
- PartEditBoxBase<Rect?>.SpinWrapping
- PartEditBoxBase<Rect?>.TextAlignment
- PartEditBoxBase<Rect?>.UsageContext
- PartEditBoxBase<Rect?>.Value
- PartEditBoxBase<Rect?>.ValueChanged