MCPInstall

syncfusion-winui-numberbox

Learn to implement Syncfusion WinUI NumberBox (SfNumberBox) control for numeric input with validation, custom formatting, and value restrictions. Use this skill when you need numeric input fields with currency, percentage, or decimal formatting in WinUI applications.

Installs
50
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/winui-ui-components-skills --skill syncfusion-winui-numberbox
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-winui-numberbox automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Implementing WinUI NumberBox

The Syncfusion WinUI NumberBox (SfNumberBox) is an advanced numeric input control that provides validation, custom formatting, and interactive features for entering numeric values.

When to Use This Component

Use NumberBox when you need to:

  • Accept numeric input with validation
  • Display values in currency, percentage, or decimal formats
  • Restrict input to a specific range (min/max)
  • Provide UpDown buttons for value adjustment
  • Support multiple numeric data types (double, decimal, int, long, etc.)
  • Enable keyboard and mouse wheel value changes
  • Handle watermark text and placeholder values

Component Overview

The NumberBox control combines these key features:

  • Numeric Validation - Automatically validates and formats input
  • Multiple Formats - Currency (C), Percentage (P), Decimal (N), and custom formats
  • Value Control - Min/max bounds and null handling
  • Interactive Adjustment - UpDown buttons, keyboard arrows, mouse scrolling
  • Data Type Support - Double, Decimal, Float, Long, Int, UInt, Byte, SByte
  • Accessibility - Full keyboard navigation and screen reader support

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Installation and NuGet package setup
  • Adding NumberBox in XAML and C#
  • Basic control creation
  • Supported data types (Double, Decimal, Float, Long, Int, UInt, Byte, SByte)
  • Placeholder text and description properties
  • Header customization
  • Value editing and validation on Enter/focus loss

UpDown Button & Value Adjustment

📄 Read: references/updown-button.md

  • UpDown button placement modes (Hidden, Inline, Compact)
  • SmallChange for keyboard/mouse increment
  • LargeChange for Page Up/Page Down increment
  • TextBox visibility control
  • Keyboard support (Arrow, Page keys)
  • Mouse scrolling for value changes

Value Formatting

📄 Read: references/formatting.md

  • CustomFormat property (C2, P2, N3 formats)
  • NumberFormatter classes (CurrencyFormatter, PercentFormatter, DecimalFormatter)
  • Currency formatting with region/culture support
  • Percentage and decimal formatting
  • Integer and fractional digit control
  • Culture-specific formatting
  • Handling both CustomFormat and NumberFormatter

Value Restrictions & Validation

📄 Read: references/restrictions.md

  • AllowNull property for null value handling
  • Minimum and Maximum bounds
  • Range validation behavior
  • IsEditable property for read-only mode
  • Text editing restrictions
  • Default value fallback when AllowNull=false

Quick Start Example

Basic NumberBox Setup

XAML:

<editors:SfNumberBox 
    x:Name="priceInput"
    HorizontalAlignment="Center"
    VerticalAlignment="Center"
    Header="Price"
    Value="0"
    Minimum="0"
    Maximum="999.99"
    CustomFormat="C2" />

C#:

SfNumberBox priceInput = new SfNumberBox();
priceInput.Header = "Price";
priceInput.Value = 0;
priceInput.Minimum = 0;
priceInput.Maximum = 999.99;
priceInput.CustomFormat = "C2";

// Handle value changes
priceInput.ValueChanged += (s, e) => {
    var newValue = e.NewValue;
    var oldValue = e.OldValue;
};

Common Implementation Patterns

Pattern 1: Currency Input Field

When: User needs to enter monetary amounts

<editors:SfNumberBox 
    Header="Amount"
    Value="0"
    CustomFormat="C2"
    Minimum="0"
    Maximum="10000"
    AllowNull="False"
    SmallChange="1" />

Pattern 2: Percentage Input Field

When: User needs to enter percentage values

<editors:SfNumberBox 
    Header="Discount"
    Value="0"
    CustomFormat="P2"
    Minimum="0"
    Maximum="100"
    SmallChange="5" />

Pattern 3: Quantity Selector with UpDown Buttons

When: User selects discrete quantities

<editors:SfNumberBox 
    Header="Quantity"
    Value="1"
    Minimum="1"
    Maximum="100"
    UpDownPlacementMode="Inline"
    SmallChange="1"
    AllowNull="False" />

Pattern 4: Read-Only Display with Adjustment

When: Display value with UpDown buttons but prevent typing

<editors:SfNumberBox 
    Value="50"
    IsEditable="False"
    UpDownPlacementMode="Inline"
    SmallChange="1" />

Pattern 5: High-Precision Decimal Input

When: Financial or scientific calculations needed

<editors:SfNumberBox 
    ValueType="Decimal"
    Value="1234.56"
    CustomFormat="0.00"
    Minimum="0"
    Maximum="999999.99" />

Key Properties Quick Reference

Value Properties

  • Value - Current numeric value
  • ValueType - Data type (Double, Decimal, Float, Long, Int, UInt, Byte, SByte)
  • AllowNull - Permit null/empty values (default: True)

Formatting Properties

  • CustomFormat - Format string (C2=currency, P2=percent, N3=decimal)
  • NumberFormatter - Advanced formatter objects
  • Culture - Culture-specific formatting

Range Properties

  • Minimum - Lowest allowed value
  • Maximum - Highest allowed value

Display Properties

  • Header - Label text
  • HeaderTemplate - Custom header layout
  • PlaceholderText - Watermark when empty
  • Description - Help text below control
  • ShowClearButton - Show/hide clear button

Interaction Properties

  • UpDownPlacementMode - Button position (Hidden, Inline, Compact)
  • SmallChange - Increment for arrows/scrolling (default: 1)
  • LargeChange - Increment for Page keys (default: 10)
  • IsEditable - Allow text input (default: True)
  • TextBoxVisibility - Show/hide text box

Events

  • ValueChanged - Fires when value changes after validation

Common Use Cases

  1. Price Input - Use C2 format, set realistic min/max bounds
  2. Age Input - Use int ValueType, set 0-150 range
  3. Discount Field - Use P2 format, set 0-100 range
  4. Quantity Picker - Use Inline UpDown, set practical limits
  5. Percentage Calculation - Use P2 format with appropriate decimals
  6. Payment Amount - Use C2 format with currency rules
  7. Decimal Precision - Use Decimal type for financial data

Installation

NuGet Package

Install-Package Syncfusion.Editors.WinUI

XAML Namespace

xmlns:editors="using:Syncfusion.UI.Xaml.Editors"

Next Steps

  • Read Getting Started for setup details
  • Review UpDown Button Features for value adjustment
  • Explore Value Formatting for currency/percentage support
  • Check Value Restrictions for validation and bounds

FAQ

What does the syncfusion-winui-numberbox skill do?

Learn to implement Syncfusion WinUI NumberBox (SfNumberBox) control for numeric input with validation, custom formatting, and value restrictions. Use this skill when you need numeric input fields with currency, percentage, or decimal formatting in WinUI applications.

How do I install syncfusion-winui-numberbox?

Run npx skills add https://github.com/syncfusion/winui-ui-components-skills --skill syncfusion-winui-numberbox in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-winui-numberbox/ (personal) or .claude/skills/syncfusion-winui-numberbox/ (project).

Which AI agents can use syncfusion-winui-numberbox?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-winui-numberbox safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-winui-numberbox?

It is published by syncfusion in syncfusion/winui-ui-components-skills. It has 50 recorded installs.

More from syncfusion/winui-ui-components-skills

View all →

syncfusion-winui-getting-started

syncfusion/winui-ui-components-skills

Comprehensive guide for setting up Syncfusion WinUI components, including license registration, NuGet package installation, system requirements verification, and troubleshooting. Use this skill when users need help with Syncfusion licensing, installation, WinUI component configuration, theme setup, or resolving installation errors.

syncfusion-winui-badge

syncfusion/winui-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winui-datagrid

syncfusion/winui-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winui-treeview

syncfusion/winui-ui-components-skills

Comprehensive guide for implementing Syncfusion WinUI TreeView (SfTreeView) control in desktop applications. Use this skill when working with hierarchical data display, tree structures, or node-based navigation. Covers TreeView implementation for file explorers, organization charts, category browsers, and expandable/collapsible data visualization in WinUI applications.

syncfusion-winui-polar-charts

syncfusion/winui-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winui-autocomplete

syncfusion/winui-ui-components-skills

Open the skill to read its SKILL.md instructions.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs