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