SizeEditBox Class
Represents a Size
edit box.
public class SizeEditBox : PartEditBoxBase<Size?>, 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.Windows.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
- System.Windows.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
- System.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
- System.Boolean:
true
if NaN is accepted as a component value; otherwise,false
. The default value isfalse
.
IsNegativeInfinityAllowed
Gets or sets whether NegativeInfinity is accepted as a component value.
public bool IsNegativeInfinityAllowed { get; set; }
Property Value
- System.Boolean:
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
- System.Boolean:
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
- System.Windows.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
- System.Windows.Size:
The highest possible value.
Minimum
Gets or sets the lowest possible value.
public Size Minimum { get; set; }
Property Value
- System.Windows.Size:
The lowest possible value.
ResolvedFormat
Gets the resolved number format string.
public string ResolvedFormat { get; }
Property Value
- System.String:
The resolved number format string.
RoundingDecimalPlace
Gets or sets the rounding decimal place.
public int? RoundingDecimalPlace { get; set; }
Property Value
- System.Nullable<System.Int32>:
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
- System.Windows.Size:
The small change value. The default value is
1.0
.
Methods
CoerceValidValue(Nullable<Size>)
Coerces the value to be within range.
protected override Size? CoerceValidValue(Size? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Windows.Size> | The value to coerce. |
Returns
- System.Nullable<System.Windows.Size>:
The coerced value.
ConvertToString(Nullable<Size>)
Converts the specified value to a string representation.
protected override string ConvertToString(Size? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | System.Nullable<System.Windows.Size> | The value. |
Returns
- System.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<System.Nullable<System.Windows.Size>>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
- System.Collections.Generic.IList<IPart>:
The parts that were generated.
IsValidValue(Nullable<Size>)
Returns whether the specified value is valid.
protected override bool IsValidValue(Size? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Windows.Size> | The value to examine. |
Returns
- System.Boolean:
true
if the value is valid; otherwise,false
.
ProcessTextInput(String)
Processes typed text.
protected override bool ProcessTextInput(string text)
Parameter | Type | Description |
---|---|---|
text | System.String | The typed text. |
Returns
- System.Boolean:
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, Boolean, out Nullable<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 | 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.Windows.Size> | Returns the value for the specified text. |
Returns
- System.Boolean:
true
if the text was converted to a value successfully; otherwise,false
.
Events
ValueChanged
Occurs after the Value
property value changes.
public event EventHandler ValueChanged
Event Type
- System.EventHandler
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<Nullable<Size>>.ActivePartIndexProperty
- PartEditBoxBase<Nullable<Size>>.CommitTriggersProperty
- PartEditBoxBase<Nullable<Size>>.HasPopupProperty
- PartEditBoxBase<Nullable<Size>>.InlinesProperty
- PartEditBoxBase<Nullable<Size>>.InputScopeNameValueProperty
- PartEditBoxBase<Nullable<Size>>.IntermediateValueProperty
- PartEditBoxBase<Nullable<Size>>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<Nullable<Size>>.IsEditableProperty
- PartEditBoxBase<Nullable<Size>>.IsNullAllowedProperty
- PartEditBoxBase<Nullable<Size>>.IsPopupButtonVisibleProperty
- PartEditBoxBase<Nullable<Size>>.IsPopupOpenProperty
- PartEditBoxBase<Nullable<Size>>.IsReadOnlyProperty
- PartEditBoxBase<Nullable<Size>>.IsSpinnerVisibleProperty
- PartEditBoxBase<Nullable<Size>>.IsUndoEnabledProperty
- PartEditBoxBase<Nullable<Size>>.PlaceholderTextProperty
- PartEditBoxBase<Nullable<Size>>.PopupBackgroundProperty
- PartEditBoxBase<Nullable<Size>>.PopupBorderBrushProperty
- PartEditBoxBase<Nullable<Size>>.PopupPickerStyleProperty
- PartEditBoxBase<Nullable<Size>>.SpinWrappingProperty
- PartEditBoxBase<Nullable<Size>>.TextAlignmentProperty
- PartEditBoxBase<Nullable<Size>>.ValueProperty
- PartEditBoxBase<Nullable<Size>>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<Nullable<Size>>.SpinnerVisibilityProperty
- PartEditBoxBase<Nullable<Size>>.UsageContextProperty
- PartEditBoxBase<Nullable<Size>>.Commit()
- PartEditBoxBase<Nullable<Size>>.Commit(Boolean)
- PartEditBoxBase<Nullable<Size>>.InvalidateParts()
- PartEditBoxBase<Nullable<Size>>.OnApplyTemplate()
- PartEditBoxBase<Nullable<Size>>.OnCreateAutomationPeer()
- PartEditBoxBase<Nullable<Size>>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnIntermediateValueChanged(Nullable<Size>, Nullable<Size>)
- PartEditBoxBase<Nullable<Size>>.OnIsNullAllowedChanged(Boolean, Boolean)
- PartEditBoxBase<Nullable<Size>>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnPopupOpened()
- PartEditBoxBase<Nullable<Size>>.OnValueChanged(Nullable<Size>, Nullable<Size>)
- PartEditBoxBase<Nullable<Size>>.SelectAll()
- PartEditBoxBase<Nullable<Size>>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<Nullable<Size>>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Size>>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<Nullable<Size>>.ActivePartIndex
- PartEditBoxBase<Nullable<Size>>.CommitTriggers
- PartEditBoxBase<Nullable<Size>>.CurrentSelectionLength
- PartEditBoxBase<Nullable<Size>>.CurrentSelectionStartOffset
- PartEditBoxBase<Nullable<Size>>.CurrentText
- PartEditBoxBase<Nullable<Size>>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<Nullable<Size>>.HasPopup
- PartEditBoxBase<Nullable<Size>>.Inlines
- PartEditBoxBase<Nullable<Size>>.InputScopeNameValue
- PartEditBoxBase<Nullable<Size>>.IntermediateValue
- PartEditBoxBase<Nullable<Size>>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<Nullable<Size>>.IsEditable
- PartEditBoxBase<Nullable<Size>>.IsNullAllowed
- PartEditBoxBase<Nullable<Size>>.IsPopupButtonVisible
- PartEditBoxBase<Nullable<Size>>.IsPopupOpen
- PartEditBoxBase<Nullable<Size>>.IsReadOnly
- PartEditBoxBase<Nullable<Size>>.IsSpinnerVisible
- PartEditBoxBase<Nullable<Size>>.IsUndoEnabled
- PartEditBoxBase<Nullable<Size>>.Parts
- PartEditBoxBase<Nullable<Size>>.PlaceholderText
- PartEditBoxBase<Nullable<Size>>.PopupBackground
- PartEditBoxBase<Nullable<Size>>.PopupBorderBrush
- PartEditBoxBase<Nullable<Size>>.PopupPickerStyle
- PartEditBoxBase<Nullable<Size>>.ResetValueCommand
- PartEditBoxBase<Nullable<Size>>.SmallDecrementValueCommand
- PartEditBoxBase<Nullable<Size>>.SmallIncrementValueCommand
- PartEditBoxBase<Nullable<Size>>.SpinWrapping
- PartEditBoxBase<Nullable<Size>>.TextAlignment
- PartEditBoxBase<Nullable<Size>>.Value
- PartEditBoxBase<Nullable<Size>>.IsNonDefaultUsageContext
- PartEditBoxBase<Nullable<Size>>.SpinnerVisibility
- PartEditBoxBase<Nullable<Size>>.UsageContext
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()