Xceed Toolkit Plus for WPF v4.6 Documentation
DecimalUpDown Class
Members  Example 


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit Namespace : DecimalUpDown Class
Represents a textbox with button spinners that allow incrementing and decrementing decimal values by using the spinner buttons, keyboard up/down arrows, or mouse wheel.
Syntax
'Declaration
 
<TemplatePartAttribute(Name="PART_TextBox", Type=System.Windows.Controls.TextBox)>
<StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class DecimalUpDown 
   Inherits Xceed.Wpf.Toolkit.CommonNumericUpDown(Of Decimal)
   Implements Xceed.Wpf.Toolkit.Core.Input.IValidateInput 
'Usage
 
Dim instance As DecimalUpDown
[TemplatePart(Name="PART_TextBox", Type=System.Windows.Controls.TextBox)]
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class DecimalUpDown : Xceed.Wpf.Toolkit.CommonNumericUpDown<decimal>, Xceed.Wpf.Toolkit.Core.Input.IValidateInput  
Remarks
When using the DecimalUpDown 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. You can also specify whether the user can directly edit the values in the text box by setting the IsReadOnly property. If you would like to get the actual formatted string representation of the value, you can use the Text property.
Example
The following shows how to create a DecimalUpDown.
<xctk:DecimalUpDown Value="1564.6749586" />
The following shows how to create a DecimalUpDown using FormatString and setting the Increment, Maximum, and Minimum values.
<xctk:DecimalUpDown FormatString="C2" Value="1564.6749586" Increment=".5" Maximum="5000.50" Minimum="50.01" />
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
                     Xceed.Wpf.Toolkit.Primitives.InputBase
                        Xceed.Wpf.Toolkit.Primitives.UpDownBase<T>
                           Xceed.Wpf.Toolkit.NumericUpDown<T>
                              Xceed.Wpf.Toolkit.CommonNumericUpDown<T>
                                 Xceed.Wpf.Toolkit.DecimalUpDown
                                    Xceed.Wpf.Toolkit.CalculatorUpDown
                                    Xceed.Wpf.Toolkit.PropertyGrid.Editors.PropertyGridEditorDecimalUpDown

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DecimalUpDown Members
Xceed.Wpf.Toolkit Namespace