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