[This is preliminary documentation and is subject to change.]

Author: Đonny

Represents a Windows spin box (also known as an up-down control) that displays numeric values.

Namespace: Tools.WindowsT.WPF.ControlsT
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[TemplatePartAttribute(Name = "PART_ButtonDown", Type = typeof(ButtonBase))]
[TemplatePartAttribute(Name = "PART_ButtonUp", Type = typeof(ButtonBase))]
[TemplatePartAttribute(Name = "PART_EditableTextBox", Type = typeof(TextBox))]
public class NumericUpDown : Control
Visual Basic
<TemplatePartAttribute(Name := "PART_ButtonDown", Type := GetType(ButtonBase))> _
<TemplatePartAttribute(Name := "PART_ButtonUp", Type := GetType(ButtonBase))> _
<TemplatePartAttribute(Name := "PART_EditableTextBox", Type := GetType(TextBox))> _
Public Class NumericUpDown _
	Inherits Control
Visual C++
[TemplatePartAttribute(Name = L"PART_ButtonDown", Type = typeof(ButtonBase))]
[TemplatePartAttribute(Name = L"PART_ButtonUp", Type = typeof(ButtonBase))]
[TemplatePartAttribute(Name = L"PART_EditableTextBox", Type = typeof(TextBox))]
public ref class NumericUpDown : public Control
F#
[<TemplatePartAttribute(Name = "PART_ButtonDown", Type = typeof(ButtonBase))>]
[<TemplatePartAttribute(Name = "PART_ButtonUp", Type = typeof(ButtonBase))>]
[<TemplatePartAttribute(Name = "PART_EditableTextBox", Type = typeof(TextBox))>]
type NumericUpDown =  
    class
        inherit Control
    end
JScript
public class NumericUpDown extends Control

Remarks

This is companion class to NumericUpDown.

This class is bsed on http://msdn.microsoft.com/en-us/library/ms771573.aspx, converted by http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx

This control contains following template parts:

PartDescription
PART_EditableTextBoxThe text box user can enter text in. This part is not compulsory but it is strongly recomended and required for certain functionality.
PART_ButtonUpIncrement button. Optional.
PART_ButtonDownDecrement button. Optional.

Inheritance Hierarchy

System..::..Object
  System.Windows.Threading..::..DispatcherObject
    System.Windows..::..DependencyObject
      System.Windows.Media..::..Visual
        System.Windows..::..UIElement
          System.Windows..::..FrameworkElement
            System.Windows.Controls..::..Control
              Tools.WindowsT.WPF.ControlsT..::..NumericUpDown

See Also

Collapse/expand Version History

1.5.2

1.5.3

  • (Beta) Default visual style changed so that NumericUpDown has same height as regular TextBox.
  • User can no longer enter following characters multiple times: PositiveSign, NegativeSign and NumberDecimalSeparator.
  • Fixed focus issues (focusable parent of textbox) and Up/Down arrow keys binding (not working)
  • Added new template parts PART_ButtonUp and PART_ButtonDown.
  • New behavior: Pressing Enter forces NumericUpDown to process it's text, coerce the text, update value and possibly raise ValueChanged event.