Updated IntegerUpDown (markdown)

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

89
IntegerUpDown.md

@ -1,61 +1,67 @@
# IntegerUpDown # 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. 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) * [Usage](#usage)
* [Applying Format Strings](#formatstring) * [Applying Format Strings](#applying-format-strings)
* [Supported Format Strings](#supportedformatstring) * [Supported Format Strings](#supported-format-strings)
* [Watermark](#watermarks) * [Watermark](#watermark)
* [Properties](#properties) * [Properties](#properties)
* [Events](#events) * [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. 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 Format Strings
## Applying FormatStrings
**Default:** **Default:**
![](IntegerUpDown_integerupdown_default.jpg)
{{ [[IntegerUpDown_integerupdown_default.jpg]]
<xctk:IntegerUpDown Value="1564" />}}
```
<xctk:IntegerUpDown Value="1564" />
```
**Number:** **Number:**
![](IntegerUpDown_integerupdown_number.jpg)
{{ [[IntegerUpDown_integerupdown_number.jpg]]
```
<xctk:IntegerUpDown FormatString="N0" Value="1564" Increment="1" Maximum="200000"/> <xctk:IntegerUpDown FormatString="N0" Value="1564" Increment="1" Maximum="200000"/>
}} ```
**Currency:** **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 ### Supported Format Strings
| C | Currency | Format Specifier | Name |
| F | Fixed Point | --- | --- |
| G | General | C | Currency |
| N | Number | F | Fixed Point |
| P | Percent | G | General |
| N | Number |
| P | Percent |
{anchor:watermarks}
## Watermark ## Watermark
You can provide a **Watermark** to show text in place of a NULL **Value**. 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" /> <xctk:IntegerUpDown Watermark="Enter Integer" />
}} ```
{anchor:properties}
## Properties ### Properties
|| Property || Description | Property | Description |
| --- | --- |
| AllowSpin | Gets or sets the ability to perform increment/decrement operations via the keyboard, button spinners, or mouse wheel. (Inherited from UpDownBase) | 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. | 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) | 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) | 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) | 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) | WatermarkTemplate| Gets or sets the DatTemplate to use for the **Watermark**. (Inherited from InputBase)
{anchor:events}
## Events ### Events
|| Event || Description | 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) | 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).**
--- ---
**Support this project, check out the [Plus Edition](http://wpftoolkit.com).**
Loading…
Cancel
Save