DoubleEditBox Class
Represents a Double
edit box.
public class DoubleEditBox : PartEditBoxBase<double?>
- Inheritance:
- object Visual UIElement FrameworkElement Control PartEditBoxBase<double?> object
Constructors
DoubleEditBox()
Initializes an instance of the DoubleEditBox
class.
public DoubleEditBox()
Properties
CalculatorPopupPickerStyle
Gets or sets the popup picker Style that uses a Calculator control.
public Style CalculatorPopupPickerStyle { get; set; }
Property Value
- Style:
The Style that uses a Calculator control.
CanSnapToChangePrecision
Gets or sets whether the value should be snapped to the precision of the incremental change value prior to applying the increment.
public bool CanSnapToChangePrecision { get; set; }
Property Value
- bool:
true
if the value should be snapped to the precision of the incremental change value prior to applying the increment; otherwise,false
. The default value istrue
.
Remarks
When true
, a value of 1.24
with change value 0.1
would result in 1.3
.
When false
, a value of 1.24
with change value 0.1
would result in 1.34
.
DefaultValue
Gets or sets the value to set when incrementing/decrementing from a null value.
public double DefaultValue { get; set; }
Property Value
- double:
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 value.
public bool IsNaNAllowed { get; set; }
Property Value
IsNegativeInfinityAllowed
Gets or sets whether NegativeInfinity is accepted as a value.
public bool IsNegativeInfinityAllowed { get; set; }
Property Value
- bool:
true
if NegativeInfinity is accepted as a value; otherwise,false
. The default value isfalse
.
IsPositiveInfinityAllowed
Gets or sets whether PositiveInfinity is accepted as a value.
public bool IsPositiveInfinityAllowed { get; set; }
Property Value
- bool:
true
if PositiveInfinity is accepted as a value; otherwise,false
. The default value isfalse
.
LargeChange
Gets or sets the large change value.
public double LargeChange { get; set; }
Property Value
- double:
The large change value. The default value is
5.0
.
Maximum
Gets or sets the highest possible value.
Minimum
Gets or sets the lowest possible value.
PickerKind
Gets or sets a DoubleEditBoxPickerKind indicating the pre-defined Style
to apply to the picker used within the popup.
public DoubleEditBoxPickerKind PickerKind { get; set; }
Property Value
- DoubleEditBoxPickerKind:
A DoubleEditBoxPickerKind indicating the pre-defined
Style
to apply to the picker used within the popup. The default value isCalculator
in WPF andDefault
in UWP.
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 double SmallChange { get; set; }
Property Value
- double:
The small change value. The default value is
1.0
.
Methods
CoerceValidValue(double?)
Coerces the value to be within range.
protected override double? CoerceValidValue(double? value)
Parameter | Type | Description |
---|---|---|
value | double? | The value to coerce. |
Returns
- double?:
The coerced value.
ConvertToString(double?)
Converts the specified value to a string representation.
protected override string ConvertToString(double? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | double? | The value. |
Returns
- string:
The string representation of the specified value.
CreateIncrementalChangeRequest(IncrementalChangeRequestKind)
Creates an incremental change (spin) request.
protected override IncrementalChangeRequest<double?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
Parameter | Type | Description |
---|---|---|
kind | IncrementalChangeRequestKind | The kind of request. |
Returns
- IncrementalChangeRequest<double?>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
IsValidValue(double?)
Returns whether the specified value is valid.
protected override bool IsValidValue(double? value)
Parameter | Type | Description |
---|---|---|
value | double? | 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 double?)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out double? 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 | double? | 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
CalculatorPopupPickerStyleProperty
Identifies the CalculatorPopupPickerStyle dependency property. This field is read-only.
public static readonly DependencyProperty CalculatorPopupPickerStyleProperty
CanSnapToChangePrecisionProperty
Identifies the CanSnapToChangePrecision dependency property. This field is read-only.
public static readonly DependencyProperty CanSnapToChangePrecisionProperty
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
PickerKindProperty
Identifies the PickerKind dependency property. This field is read-only.
public static readonly DependencyProperty PickerKindProperty
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<double?>.ActivePartIndexProperty
- PartEditBoxBase<double?>.CommitTriggersProperty
- PartEditBoxBase<double?>.HasPopupProperty
- PartEditBoxBase<double?>.InlinesProperty
- PartEditBoxBase<double?>.InputScopeNameValueProperty
- PartEditBoxBase<double?>.IntermediateValueProperty
- PartEditBoxBase<double?>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<double?>.IsEditableProperty
- PartEditBoxBase<double?>.IsNullAllowedProperty
- PartEditBoxBase<double?>.IsPopupButtonVisibleProperty
- PartEditBoxBase<double?>.IsPopupOpenProperty
- PartEditBoxBase<double?>.IsReadOnlyProperty
- PartEditBoxBase<double?>.IsSpinnerVisibleProperty
- PartEditBoxBase<double?>.IsUndoEnabledProperty
- PartEditBoxBase<double?>.PlaceholderTextProperty
- PartEditBoxBase<double?>.PopupBackgroundProperty
- PartEditBoxBase<double?>.PopupBorderBrushProperty
- PartEditBoxBase<double?>.PopupPickerStyleProperty
- PartEditBoxBase<double?>.SpinWrappingProperty
- PartEditBoxBase<double?>.TextAlignmentProperty
- PartEditBoxBase<double?>.ValueProperty
- PartEditBoxBase<double?>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<double?>.SpinnerVisibilityProperty
- PartEditBoxBase<double?>.UsageContextProperty
- PartEditBoxBase<double?>.Commit()
- PartEditBoxBase<double?>.Commit(bool)
- PartEditBoxBase<double?>.InvalidateParts()
- PartEditBoxBase<double?>.OnApplyTemplate()
- PartEditBoxBase<double?>.OnCreateAutomationPeer()
- PartEditBoxBase<double?>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<double?>.OnIntermediateValueChanged(double?, double?)
- PartEditBoxBase<double?>.OnIsNullAllowedChanged(bool, bool)
- PartEditBoxBase<double?>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<double?>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<double?>.OnPopupOpened()
- PartEditBoxBase<double?>.OnValueChanged(double?, double?)
- PartEditBoxBase<double?>.SelectAll()
- PartEditBoxBase<double?>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<double?>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<double?>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<double?>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<double?>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<double?>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<double?>.ActivePartIndex
- PartEditBoxBase<double?>.CommitTriggers
- PartEditBoxBase<double?>.CurrentSelectionLength
- PartEditBoxBase<double?>.CurrentSelectionStartOffset
- PartEditBoxBase<double?>.CurrentText
- PartEditBoxBase<double?>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<double?>.HasPopup
- PartEditBoxBase<double?>.Inlines
- PartEditBoxBase<double?>.InputScopeNameValue
- PartEditBoxBase<double?>.IntermediateValue
- PartEditBoxBase<double?>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<double?>.IsEditable
- PartEditBoxBase<double?>.IsNullAllowed
- PartEditBoxBase<double?>.IsPopupButtonVisible
- PartEditBoxBase<double?>.IsPopupOpen
- PartEditBoxBase<double?>.IsReadOnly
- PartEditBoxBase<double?>.IsSpinnerVisible
- PartEditBoxBase<double?>.IsUndoEnabled
- PartEditBoxBase<double?>.Parts
- PartEditBoxBase<double?>.PlaceholderText
- PartEditBoxBase<double?>.PopupBackground
- PartEditBoxBase<double?>.PopupBorderBrush
- PartEditBoxBase<double?>.PopupPickerStyle
- PartEditBoxBase<double?>.ResetValueCommand
- PartEditBoxBase<double?>.SmallDecrementValueCommand
- PartEditBoxBase<double?>.SmallIncrementValueCommand
- PartEditBoxBase<double?>.SpinWrapping
- PartEditBoxBase<double?>.TextAlignment
- PartEditBoxBase<double?>.Value
- PartEditBoxBase<double?>.IsNonDefaultUsageContext
- PartEditBoxBase<double?>.SpinnerVisibility
- PartEditBoxBase<double?>.UsageContext