Summary
Represents a Windows spin box (also known as an up-down control) that displays numeric values.
- Namespace
- MahApps
.Metro .Controls - Base Types
-
- Control
graph BT
Type-->Base0["Control"]
Type["NumericUpDown"]
class Type type-node
Syntax
[TemplatePart(Name = PART_NumericUp, Type = typeof(RepeatButton))]
[TemplatePart(Name = PART_NumericDown, Type = typeof(RepeatButton))]
[TemplatePart(Name = PART_TextBox, Type = typeof(TextBox))]
public class NumericUpDown : Control
Attributes
| Type | Description |
|---|---|
| TemplatePart | |
| TemplatePart | |
| TemplatePart |
Events
| Name | Type | Summary |
|---|---|---|
| DelayChanged | RoutedEventHandler |
Add / Remove DelayChangedEvent handler
Event which will be fired from this NumericUpDown when its delay value has been changed.
|
| MaximumReached | RoutedEventHandler |
Add / Remove MaximumReachedEvent handler
Event fired from this NumericUpDown when its value has reached the maximum value.
|
| MinimumReached | RoutedEventHandler |
Add / Remove MinimumReachedEvent handler
Event fired from this NumericUpDown when its value has reached the minimum value.
|
| ValueChanged | Routed |
Add / Remove ValueChangedEvent handler
Event which will be fired from this NumericUpDown when its value has been changed.
|
| ValueDecremented | Numeric |
Add / Remove ValueDecrementedEvent handler
Event which will be fired from this NumericUpDown when its value was decremented.
|
| ValueIncremented | Numeric |
Add / Remove ValueIncrementedEvent handler
Event which will be fired from this NumericUpDown when its value was incremented.
|
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Buttons |
Identifies the
ButtonsAlignment dependency property.static
|
|
| Change |
Identifies the
ChangeValueOnTextChanged dependency property.static
|
|
| CultureProperty |
Identifies the
Culture dependency property.static
|
|
| Decimal |
Identifies the
DecimalPointCorrection dependency property.static
|
|
| DelayChangedEvent |
Identifies the
DelayChanged routed event.static
|
|
| DelayProperty |
Identifies the
Delay dependency property.static
|
|
| Hide |
Identifies the
HideUpDownButtons dependency property.static
|
|
| Intercept |
Identifies the
InterceptArrowKeys dependency property.static
|
|
| Intercept |
Identifies the
InterceptManualEnter dependency property.static
|
|
| Intercept |
Identifies the
InterceptMouseWheel dependency property.static
|
|
| IntervalProperty |
Identifies the
Interval dependency property.static
|
|
| IsReadOnlyProperty |
Identifies the
IsReadOnly dependency property.static
|
|
| MaximumProperty |
Identifies the
Maximum dependency property.static
|
|
| MaximumReachedEvent |
Identifies the
MaximumReached routed event.static
|
|
| MinimumProperty |
Identifies the
Minimum dependency property.static
|
|
| MinimumReachedEvent |
Identifies the
MinimumReached routed event.static
|
|
| Numeric |
Identifies the
NumericInputMode dependency property.static
|
|
| Parsing |
Identifies the
ParsingNumberStyle dependency property.static
|
|
| Snap |
Identifies the
SnapToMultipleOfInterval dependency property.static
|
|
| SpeedupProperty |
Identifies the
Speedup dependency property.static
|
|
| StringFormatProperty |
Identifies the
StringFormat dependency property.static
|
|
| Switch |
Identifies the
SwitchUpDownButtons dependency property.static
|
|
| Text |
Identifies the
TextAlignment dependency property.static
|
|
| Track |
Identifies the
TrackMouseWheelWhenMouseOver dependency property.static
|
|
| Up |
Identifies the
UpDownButtonsFocusable dependency property.static
|
|
| Up |
Identifies the
UpDownButtonsWidth dependency property.static
|
|
| ValueChangedEvent |
Identifies the
ValueChanged routed event.static
|
|
| Value |
Identifies the
ValueDecremented routed event.static
|
|
| Value |
Identifies the
ValueIncremented routed event.static
|
|
| ValueProperty |
Identifies the
Value dependency property.static
|
Properties
| Name | Value | Summary |
|---|---|---|
| ButtonsAlignment | ButtonsAlignment |
The ButtonsAlignment property specifies horizontal alignment of the up/down buttons.
|
| Change |
bool |
Gets or sets a value indicating whether the value will be changed directly on every TextBox text changed input event or when using the Enter key.
|
| Culture | CultureInfo |
Gets or sets a value indicating the culture to be used in string formatting and converting operations.
|
| Decimal |
Decimal |
Gets or sets the decimal-point correction mode. The default is
Inherits
|
| Delay | int | |
| HideUpDownButtons | bool |
Gets or sets a value indicating whether the up/down button of the control are visible.
|
| InterceptArrowKeys | bool |
Gets or sets a value indicating whether the user can use the arrow keys
Key.Up and Key.Down to change the value.
|
| InterceptManualEnter | bool |
Gets or sets a value indicating whether the user can enter text in the control.
|
| InterceptMouseWheel | bool |
Gets or sets a value indicating whether the user can use the mouse wheel to change the value.
|
| Interval | double |
Gets or sets the interval value for increasing/decreasing the
Value .
|
| IsReadOnly | bool |
Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only.
|
| Maximum | double |
Maximum restricts the maximum value of the Value property.
|
| Minimum | double |
Minimum restricts the minimum value of the Value property.
|
| NumericInputMode | NumericInput |
Gets or sets which numeric input for this NumericUpDown is allowed.
|
| ParsingNumberStyle | NumberStyles |
Gets or sets the parsing number style for the value from text to numeric value.
|
| Snap |
bool |
Indicates if the NumericUpDown should round the value to the nearest possible interval when the focus moves to another element.
|
| Speedup | bool | |
| StringFormat | string |
Gets or sets the formatting for the displaying
Value
|
| SwitchUpDownButtons | bool |
Gets or sets a value indicating whether the up/down buttons will be switched.
|
| TextAlignment | TextAlignment |
Gets or sets the horizontal alignment of the contents inside the text box.
|
| Track |
bool |
Gets or sets a value indicating whether the control must have the focus in order to change values using the mouse wheel.
|
| Up |
bool |
Gets or sets whether the up and down buttons will got the focus when using them.
|
| UpDownButtonsWidth | double |
Gets or sets the width of the up/down buttons.
|
| Value | double? |
Gets or sets the value of the NumericUpDown.
|
Methods
| Name | Value | Summary |
|---|---|---|
| OnApplyTemplate |
void |
When overridden in a derived class, is invoked whenever application code or internal processes call
System.Windows.FrameworkElement.ApplyTemplate.
|
| OnDelayChanged |
void |
This method is invoked when the Delay property changes.
|
| OnMaximumChanged |
void |
This method is invoked when the Maximum property changes.
|
| OnMinimumChanged |
void |
This method is invoked when the Minimum property changes.
|
| OnPreviewKeyDown |
void | |
| OnPreviewKeyUp |
void | |
| OnPreviewMouseWheel |
void | |
| OnPreviewTextInput |
void | |
| OnSpeedupChanged |
void |
This method is invoked when the Speedup property changes.
|
| OnValueChanged |
void |
Raises the
ValueChanged routed event.
|
| SelectAll |
void |
