mcpField
S
syncfusion-winforms-numericupdown

syncfusion-winforms-numericupdown

github.com/syncfusionDevelopment279 installsUpdated 1w ago
Repository

About syncfusion-winforms-numericupdown

This skill helps WinForms developers implement Syncfusion NumericUpDownExt for constrained, formatted numeric input. It covers hexadecimal display, themed borders, and negative-value colors.

Key features

  1. 01Minimum, maximum, and step constraints
  2. 02Hexadecimal value display
  3. 03Decimal places and thousands separators
  4. 04Themed borders and color customization
  5. 05Keyboard input and text alignment

Use cases

  1. 01Enter numeric settings in configuration forms
  2. 02Input prices or tax rates with decimal precision
  3. 03Enter hexadecimal values in a color editor
  4. 04Set constrained numeric inputs in measurement tools

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-numericupdown

After installing, type/syncfusion-winforms-numericupdownin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
appearance-customization.md
behavior-settings.md
display-settings.md
getting-started.md
themes-and-styles.md
value-settings.md

Details

From the project README

Implementing NumericUpDownExt in Syncfusion WinForms

This skill guides you in implementing Syncfusion WinForms NumericUpDownExt control—an enhanced numeric up/down control with XP themes, value constraints, hexadecimal display, decimal formatting, and professional appearance features.

When to Use This Skill

Use this skill when the user needs to:

  • Implement enhanced numeric up/down controls with XP themes support
  • Set value constraints (Minimum, Maximum, Increment values)
  • Display hexadecimal values in numeric input
  • Format numbers with decimal places and thousands separators
  • Apply themed borders (FixedSingle, Fixed3D, ThemedBorder)
  • Use separate colors for negative values (NegativeForeColor)
  • Enable keyboard arrow key input for value changes
  • Support large value entry via keyboard
  • Configure text and button alignment (left/right/center)
  • Create professional numeric input forms with consistent theming
  • Replace standard NumericUpDown with visually enhanced alternatives

NumericUpDownExt is ideal when visual theming and advanced formatting are important for numeric input controls.

Component Overview

NumericUpDownExt is an advanced numeric up/down control that extends the standard WinForms NumericUpDown with XP themes and enhanced features. It provides:

  • XP Themes Support: Enhanced look and feel missing in standard .NET control
  • Value Constraints: Minimum, Maximum, Increment properties
  • Display Options: Decimal places, thousands separator, hexadecimal format
  • Appearance Customization: Colors, borders, alignment options
  • Themed Borders: FixedSingle, Fixed3D, None, ThemedBorder
  • Keyboard Support: Arrow keys, large value entry
  • Negative Value Styling: Separate foreground color for negative numbers
  • Layout Control: MinSize, MaxSize properties

Key Difference from Standard NumericUpDown: NumericUpDownExt adds XP themes, hexadecimal display, themed borders, and negative value color styling.

Documentation and Navigation Guide

Getting Started and Basic Setup

📄 Read: references/getting-started.md

Read this reference when users need:

  • Assembly dependencies and NuGet package installation
  • Creating NumericUpDownExt via designer or code
  • Basic properties and configuration
  • Adding NumericUpDownExt to forms
  • Understanding control hierarchy
  • Complete minimal working example
Value Settings and Constraints

📄 Read: references/value-settings.md

Read this reference when users need:

  • Value property for current numeric value
  • Minimum and Maximum constraints
  • Increment property for step values
  • Hexadecimal display mode
  • HexValue property for hex representation
  • UpButton/DownButton methods
  • Value constraint examples and patterns
Display Settings

📄 Read: references/display-settings.md

Read this reference when users need:

  • DecimalPlaces property for fractional display
  • ThousandsSeparator for large numbers
  • Display formatting options
  • Currency and percentage formatting
  • Examples with different number formats
Appearance Customization

📄 Read: references/appearance-customization.md

Read this reference when users need:

  • Background and foreground colors
  • NegativeForeColor for negative values
  • Border styles (FixedSingle, Fixed3D, None)
  • ThemedBorder property
  • Text and button alignment
  • Layout settings (MaxSize, MinSize)
  • Complete custom styling examples
Behavior Settings

📄 Read: references/behavior-settings.md

Read this reference when users need:

  • InterceptArrowKeys property for keyboard input
  • ReadOnly mode configuration
  • Key support for large value entry
  • Behavior configuration options
  • User interaction patterns
Themes and Visual Styles

📄 Read: references/themes-and-styles.md

Read this reference when users need:

  • Visual styles overview
  • Applying themes to NumericUpDownExt
  • XP Themes look and feel
  • Theme integration with application
  • Style best practices

Quick Start Example

Here's a minimal example creating a NumericUpDownExt control with constraints:

using Syncfusion.Windows.Forms.Tools;
using System;
using System.Drawing;
using System.Windows.Forms;

public class NumericUpDownExample : Form
{
    private NumericUpDownExt numericUpDownExt1;
    
    public NumericUpDownExample()
    {
        // Create NumericUpDownExt
        numericUpDownExt1 = new NumericUpDownExt();
        numericUpDownExt1.Location = new Point(70, 29);
        numericUpDownExt1.Size = new Size(120, 20);
        
        // Set value constraints
        numericUpDownExt1.Minimum = 0;
        numericUpDownExt1.Maximum = 100;
        numericUpDownExt1.Value = 50;
        numericUpDownExt1.Increment = 5;
        
        // Set display formatting
        numericUpDownExt1.DecimalPlaces = 2;
        numericUpDownExt1.ThousandsSeparator = true;
        
        // Add to form
        this.Controls.Add(numericUpDownExt1);
        
        this.Text = "NumericUpDownExt Example";
        this.Size = new Size(300, 150);
    }
}

Result: A numeric up/down control with values ranging 0-100, incrementing by 5, displaying 2 decimal places with thousands separator.

Common Patterns

Currency Input Control

Pattern: Create a numeric control for currency input with proper formatting.

// Currency input with constraints
NumericUpDownExt currencyInput = new NumericUpDownExt();
currencyInput.Location = new Point(100, 20);
currencyInput.Size = new Size(120, 20);

// Value settings
currencyInput.Minimum = 0;
currencyInput.Maximum = 999999.99m;
currencyInput.Increment = 0.01m;
currencyInput.Value = 0;

// Display formatting
currencyInput.DecimalPlaces = 2;
currencyInput.ThousandsSeparator = true;

// Add label for context
Label label = new Label();
label.Text = "Price: $";
label.Location = new Point(50, 23);
label.AutoSize = true;

this.Controls.Add(label);
this.Controls.Add(currencyInput);

When: User needs currency input with cents precision and large number formatting.

Percentage Selector

Pattern: Numeric control for percentage values (0-100).

NumericUpDownExt percentInput = new NumericUpDownExt();
percentInput.Location = new Point(100, 50);
percentInput.Size = new Size(100, 20);

// Percentage constraints
percentInput.Minimum = 0;
percentInput.Maximum = 100;
percentInput.Increment = 5;
percentInput.Value = 50;
percentInput.DecimalPlaces = 1;

// Add % suffix label
Label percentLabel = new Label();
percentLabel.Text = "%";
percentLabel.Location = new Point(205, 53);
percentLabel.AutoSize = true;

this.Controls.Add(percentInput);
this.Controls.Add(percentLabel);

When: User needs percentage input with constrained range.

Hexadecimal Color Value Input

Pattern: Display and edit values in hexadecimal format.

NumericUpDownExt hexInput = new NumericUpDownExt();
hexInput.Location = new Point(100, 80);
hexInput.Size = new Size(120, 20);

// Hex mode for color values
hexInput.Hexadecimal = true;
hexInput.Minimum = 0;
hexInput.Maximum = 0xFFFFFF; // Max RGB value
hexInput.Increment = 0x10;
hexInput.Value = 0xFF5733; // Example color

// Add label
Label hexLabel = new Label();
hexLabel.Text = "Color (Hex):";
hexLabel.Location = new Point(20, 83);
hexLabel.AutoSize = true;

this.Controls.Add(hexLabel);
this.Controls.Add(hexInput);

When: User needs hexadecimal input for colors, memory addresses, or byte values.

Key Properties

Value Properties
PropertyTypeDescriptionWhen to Use
ValuedecimalCurrent numeric valueGet/set control value
MinimumdecimalMinimum allowed valueSet lower constraint
MaximumdecimalMaximum allowed valueSet upper constraint
IncrementdecimalValue change stepControl increment size
HexadecimalboolDisplay in hex formatHex value input
HexValuestringHex representation (read-only)Get hex string
Display Properties
PropertyTypeDescriptionWhen to Use
DecimalPlacesintNumber of decimal placesFractional precision
ThousandsSeparatorboolShow thousands separatorLarge number formatting
Appearance Properties
PropertyTypeDescriptionWhen to Use
BackColorColorBackground colorCustom backgrounds
ForeColorColorText colorCustom text colors
NegativeForeColorColorColor for negative valuesHighlight negative numbers
BorderStyleBorderStyleBorder style (FixedSingle/Fixed3D/None)Control appearance
ThemedBorderboolUse themed borderModern appearance
Behavior Properties
PropertyTypeDescriptionWhen to Use
InterceptArrowKeysboolAllow arrow key inputKeyboard value changes
ReadOnlyboolPrevent value editingDisplay-only mode
UpDownAlignLeftRightAlignmentButton position (Left/Right)Layout customization
TextAlignHorizontalAlignmentText alignmentLeft/Right/Center alignment

Common Use Cases

Settings Forms

Numeric inputs for application settings:

  • Font size selector (8-72 pt)
  • Timeout values (seconds/minutes)
  • Buffer size settings
  • Thread count configuration
Financial Applications

Currency and percentage inputs:

  • Price entry with decimal precision
  • Discount percentage selectors
  • Tax rate inputs
  • Account balance displays
Scientific/Engineering Tools

Precision numeric input:

  • Measurement values with decimal places
  • Calibration parameters
  • Calculation inputs with constraints
  • Unit conversion interfaces
Color Pickers

Hexadecimal color value input:

  • RGB component values (0-255)
  • Hex color codes (#000000-#FFFFFF)
  • Alpha channel values
  • Color palette editors

Implementation Checklist

When implementing NumericUpDownExt, ensure:

  • ✅ Required assemblies referenced (Syncfusion.Tools.Windows.dll, etc.)
  • ✅ Namespace included (Syncfusion.Windows.Forms.Tools)
  • ✅ NumericUpDownExt instance created and configured
  • ✅ Value constraints set (Minimum, Maximum, Increment)
  • ✅ Display formatting configured (DecimalPlaces, ThousandsSeparator)
  • ✅ Location and Size specified for layout
  • ✅ Default value set with Value property
  • ✅ Event handlers added for ValueChanged if needed
  • ✅ Validation implemented for business rules
  • ✅ Testing with boundary values (min, max, zero, negatives)

Troubleshooting Quick Reference

Issue: Value not changing with arrow keys

  • Set InterceptArrowKeys = true
  • Ensure control has focus
  • Check if ReadOnly is false

Issue: Decimal places not displaying

  • Set DecimalPlaces property to desired count
  • Ensure Value has decimal component
  • Check Value is not integer-only

Issue: Thousands separator not showing

  • Set ThousandsSeparator = true
  • Ensure value is >= 1000
  • Verify culture settings support separator

Issue: Cannot set value outside range

  • Check Minimum and Maximum properties
  • Ensure desired value is within constraints
  • Use decimal type for large values

Issue: Hexadecimal display not working

  • Set Hexadecimal = true
  • Ensure value is valid hex range
  • Use HexValue property to read hex string

Issue: Negative values not showing in different color

  • Set NegativeForeColor property explicitly
  • Ensure Minimum allows negative values
  • Check value is actually negative

Summary

NumericUpDownExt provides enhanced numeric input functionality with:

  • XP Themes: Modern look and feel
  • Value Constraints: Min/Max/Increment control
  • Display Formatting: Decimal places, thousands separator, hexadecimal
  • Visual Customization: Colors, borders, alignment, themed appearance

Use NumericUpDownExt when visual theming, advanced formatting, and precise value control are important for creating professional numeric input controls in WinForms applications.

Comments

Markdown supported