NumericUpDown.Increment Property

 

Gets or sets the value to increment or decrement the spin box (also known as an up-down control) when the up or down buttons are clicked.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member Increment : decimal with get, set

Property Value

Type: System.Decimal

The value to increment or decrement the Value property when the up or down buttons are clicked on the spin box. The default value is 1.

Exception Condition
ArgumentOutOfRangeException

The assigned value is not greater than or equal to zero.

Clicking the up button causes the Value property to increment by the amount specified by the Increment property and approach the Maximum property. Clicking the down button causes the Value property to be decremented by the amount specified by the Increment property and approach the Minimum property.

The following code example creates and initializes a NumericUpDown control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three CheckBox controls have been placed on a form and handlers for their Click events have been instantiated. The DecimalPlaces, ThousandsSeparator, and Hexadecimal properties are set on the Click event of each check box.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: