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


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit Namespace : CalculatorUpDown Class
A control that provides a TextBox with button spinners that allow incrementing and decrementing numeric values by using the spinner buttons, keyboard up/down arrows, or mouse wheel, and also provides a Calculator dropdown that allows you to perform mathematical calculations.
Syntax
'Declaration
 
<TemplatePartAttribute(Name="PART_CalculatorPopup", Type=System.Windows.Controls.Primitives.Popup)>
<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 CalculatorUpDown 
   Inherits DecimalUpDown
   Implements Xceed.Wpf.Toolkit.Core.Input.IValidateInput 
'Usage
 
Dim instance As CalculatorUpDown
[TemplatePart(Name="PART_CalculatorPopup", Type=System.Windows.Controls.Primitives.Popup)]
[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 CalculatorUpDown : DecimalUpDown, Xceed.Wpf.Toolkit.Core.Input.IValidateInput  
Remarks

When using the CalculatorUpDown 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 if the user can directly edit the values in the text box by setting the IsEditable property. To get the actual formatted string representation of the value, use the Text property.

FormatString supports the following specifiers: C (currency), F (fixed point), G (general), N (number), and P (percent).

Example
The following example shows how to create a floating-point CalculatorUpDown using FormatString.
<xctk:CalculatorUpDown FormatString="F3" Value="1564.6749586" Increment=".001"  Maximum="200000.599" />
The following example shows how to create a currency CalculatorUpDown using FormatString.
<xctk:CalculatorUpDown FormatString="C2" Value="1564.6749586" Increment=".5" Maximum="5000.50" Minimum="50.01" />
The following example shows how to use the Watermark property.
<xctk:CalculatorUpDown Watermark="Enter Value" />
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

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

CalculatorUpDown Members
Xceed.Wpf.Toolkit Namespace