Class NumericUpDown
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Inheritance
Namespace: Sdl.Desktop.Platform.Controls.Controls
Assembly: Sdl.Desktop.Platform.Controls.dll
Syntax
public class NumericUpDown : Control
Constructors
NumericUpDown()
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public NumericUpDown()
Fields
AllowPositiveNegativeSignProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty AllowPositiveNegativeSignProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ButtonsAlignmentProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty ButtonsAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
CultureProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HideUpDownButtonsProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty HideUpDownButtonsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
InterceptArrowKeysProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty InterceptArrowKeysProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
InterceptManualEnterProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty InterceptManualEnterProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
InterceptMouseWheelProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty InterceptMouseWheelProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IntervalProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty IntervalProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsReadOnlyProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaximumProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaximumReachedEvent
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly RoutedEvent MaximumReachedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
MinimumProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MinimumReachedEvent
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly RoutedEvent MinimumReachedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
StringFormatProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty StringFormatProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TextAlignmentProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty TextAlignmentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TrackMouseWheelWhenMouseOverProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty TrackMouseWheelWhenMouseOverProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
UpDownButtonsWidthProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty UpDownButtonsWidthProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ValueChangedEvent
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly RoutedEvent ValueChangedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
ValueDecrementedEvent
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly RoutedEvent ValueDecrementedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
ValueIncrementedEvent
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly RoutedEvent ValueIncrementedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
ValueProperty
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
AllowPositiveNegativeSign
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public bool AllowPositiveNegativeSign { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ButtonsAlignment
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public ButtonsAlignment ButtonsAlignment { get; set; }
Property Value
Type | Description |
---|---|
ButtonsAlignment |
Culture
Gets or sets a value indicating the culture to be used in string formatting operations.
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
CultureInfo |
HideUpDownButtons
Gets or sets a value indicating whether the +/- button of the control is visible.
Declaration
public bool HideUpDownButtons { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If the value is false then the Value of the control can be changed only if one of the following cases is satisfied:
- InterceptArrowKeys is true.
- InterceptMouseWheel is true.
- InterceptManualEnter is true.
InterceptArrowKeys
Gets or sets a value indicating whether the user can use the arrow keys System.Windows.Input.Key.Up and System.Windows.Input.Key.Down to change values.
Declaration
public bool InterceptArrowKeys { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
InterceptManualEnter
Gets or sets a value indicating whether the user can enter text in the control.
Declaration
public bool InterceptManualEnter { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
InterceptMouseWheel
Gets or sets a value indicating whether the user can use the mouse wheel to change values.
Declaration
public bool InterceptMouseWheel { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Interval
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public double Interval { get; set; }
Property Value
Type | Description |
---|---|
Double |
IsReadOnly
Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Maximum
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public double Maximum { get; set; }
Property Value
Type | Description |
---|---|
Double |
Minimum
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public double Minimum { get; set; }
Property Value
Type | Description |
---|---|
Double |
StringFormat
Gets or sets the formatting for the displaying Value
Declaration
public string StringFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
TextAlignment
Gets or sets the horizontal alignment of the contents of the text box.
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment |
TrackMouseWheelWhenMouseOver
Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel.
Declaration
public bool TrackMouseWheelWhenMouseOver { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
UpDownButtonsWidth
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public double UpDownButtonsWidth { get; set; }
Property Value
Type | Description |
---|---|
Double |
Value
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public double? Value { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Double> |
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnMaximumChanged(Double, Double)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected virtual void OnMaximumChanged(double oldMaximum, double newMaximum)
Parameters
Type | Name | Description |
---|---|---|
Double | oldMaximum | |
Double | newMaximum |
OnMinimumChanged(Double, Double)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected virtual void OnMinimumChanged(double oldMinimum, double newMinimum)
Parameters
Type | Name | Description |
---|---|---|
Double | oldMinimum | |
Double | newMinimum |
OnPreviewKeyDown(KeyEventArgs)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
KeyEventArgs | e |
OnPreviewKeyUp(KeyEventArgs)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected override void OnPreviewKeyUp(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
KeyEventArgs | e |
OnPreviewMouseWheel(MouseWheelEventArgs)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseWheelEventArgs | e |
OnPreviewTextInput(Object, TextCompositionEventArgs)
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
protected void OnPreviewTextInput(object sender, TextCompositionEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
TextCompositionEventArgs | e |
OnValueChanged(Nullable<Double>, Nullable<Double>)
Raises the ValueChanged routed event.
Declaration
protected virtual void OnValueChanged(double? oldValue, double? newValue)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Double> | oldValue | Old value of the Value property |
Nullable<Double> | newValue | New value of the Value property |
SelectAll()
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public void SelectAll()
Events
MaximumReached
Event fired from this NumericUpDown when its value has reached the maximum value
Declaration
public event RoutedEventHandler MaximumReached
Event Type
Type | Description |
---|---|
RoutedEventHandler |
MinimumReached
Event fired from this NumericUpDown when its value has reached the minimum value
Declaration
public event RoutedEventHandler MinimumReached
Event Type
Type | Description |
---|---|
RoutedEventHandler |
ValueChanged
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public event RoutedPropertyChangedEventHandler<double?> ValueChanged
Event Type
Type | Description |
---|---|
RoutedPropertyChangedEventHandler<Nullable<Double>> |
ValueDecremented
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public event NumericUpDownChangedRoutedEventHandler ValueDecremented
Event Type
Type | Description |
---|---|
NumericUpDownChangedRoutedEventHandler |
ValueIncremented
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
Declaration
public event NumericUpDownChangedRoutedEventHandler ValueIncremented
Event Type
Type | Description |
---|---|
NumericUpDownChangedRoutedEventHandler |