Updated IntegerUpDown (markdown)

master
DianeXceed 9 years ago
parent
commit
24f89b01bc
  1. 89
      IntegerUpDown.md

89
IntegerUpDown.md

@ -1,61 +1,67 @@
# IntegerUpDown
The IntegerUpDown control provides a TextBox with button spinners that allow incrementing and decrementing Nullable<int> values by using the spinner buttons, keyboard up/down arrows, or mouse wheel.
* [Usage](#usage)
* [Applying Format Strings](#formatstring)
* [Supported Format Strings](#supportedformatstring)
* [Watermark](#watermarks)
* [Applying Format Strings](#applying-format-strings)
* [Supported Format Strings](#supported-format-strings)
* [Watermark](#watermark)
* [Properties](#properties)
* [Events](#events)
{anchor:usage}
## Usage
![](IntegerUpDown_integerupdown.jpg)
### Usage
[[IntegerUpDown_integerupdown.jpg]]
When using the IntegerUpDown in data binding scenarios, bind your object's value to the **Value** property. You can specify how much to increment the value by setting the **Increment** property. You can control the minimum and maximum allowed values by setting the **Minimum** and the **Maximum** properties. Use IsReadOnly to determine whether the control is read only. If you would like to get the actual formatted string representation of the value, you can use the **Text** property.
{anchor:formatstring}
## Applying FormatStrings
### Applying Format Strings
**Default:**
![](IntegerUpDown_integerupdown_default.jpg)
{{
<xctk:IntegerUpDown Value="1564" />}}
[[IntegerUpDown_integerupdown_default.jpg]]
```
<xctk:IntegerUpDown Value="1564" />
```
**Number:**
![](IntegerUpDown_integerupdown_number.jpg)
{{
[[IntegerUpDown_integerupdown_number.jpg]]
```
<xctk:IntegerUpDown FormatString="N0" Value="1564" Increment="1" Maximum="200000"/>
}}
```
**Currency:**
![](IntegerUpDown_integerupdown_currency.jpg)
{{
<xctk:IntegerUpDown FormatString="C0" Value="1564" Increment="1" Maximum="5000" Minimum="50"/>
}}
[[IntegerUpDown_integerupdown_currency.jpg]]
{anchor:supportedformatstring}
## Supported Format Strings
```
<xctk:IntegerUpDown FormatString="C0" Value="1564" Increment="1" Maximum="5000" Minimum="50"/>
```
|| Format Specifier || Name
| C | Currency
| F | Fixed Point
| G | General
| N | Number
| P | Percent
### Supported Format Strings
| Format Specifier | Name |
| --- | --- |
| C | Currency |
| F | Fixed Point |
| G | General |
| N | Number |
| P | Percent |
{anchor:watermarks}
## Watermark
You can provide a **Watermark** to show text in place of a NULL **Value**.
![](IntegerUpDown_integerupdown_watermark.jpg)
{{
[[IntegerUpDown_integerupdown_watermark.jpg]]
```
<xctk:IntegerUpDown Watermark="Enter Integer" />
}}
{anchor:properties}
## Properties
|| Property || Description
```
### Properties
| Property | Description |
| --- | --- |
| AllowSpin | Gets or sets the ability to perform increment/decrement operations via the keyboard, button spinners, or mouse wheel. (Inherited from UpDownBase)
| AllowTextInput | Determines if the editable part of the control can be edited. The editable part does not include buttons or spinners, it is typically the text part.
| AutoMoveFocus | Gets or sets if the focus can move from this control to other controls. (Inherited from NumericUpDown)
@ -79,11 +85,12 @@ You can provide a **Watermark** to show text in place of a NULL **Value**.
| Value | Gets or sets the numeric value. (Inherited from UpDownBase)
| Watermark | Gets or sets the object to use as a watermark if the **Value** is null. (Inherited from InputBase)
| WatermarkTemplate| Gets or sets the DatTemplate to use for the **Watermark**. (Inherited from InputBase)
{anchor:events}
## Events
|| Event || Description
| InputValidationError | Occurs when the Text cannot be converted to a valid Value. (Inherited from UpDownBase)
| ValueChanged | Raised when the Value changes. (Inherited from UpDownBase)
**Support this project, check out the [Plus Edition](http://wpftoolkit.com).**
---
### Events
| Event | Description |
| --- | --- |
| InputValidationError | Occurs when the Text cannot be converted to a valid Value. (Inherited from UpDownBase) |
| ValueChanged | Raised when the Value changes. (Inherited from UpDownBase) |
---
**Support this project, check out the [Plus Edition](http://wpftoolkit.com).**
Loading…
Cancel
Save