Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-percent-textbox同步融合 winform 百分比文本框

Agent Skill

syncfusion-winforms-percent-textbox 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

659

周安装

28

GitHub Stars

公开资料未说明

下载量

231
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-winforms-percent-textbox(同步融合 winform 百分比文本框)
来源仓库:https://github.com/syncfusion/winforms-ui-components-skills
仓库路径:skills/syncfusion-winforms-percent-textbox
安装命令:
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-percent-textbox
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-percent-textbox

简介

专用于百分比数值输入的控件,自动附加百分号并限制有效范围 0-100。

  • 适用于进度设置、折扣率、增长率等比例型数据录入需求。
  • 技能内置四舍五入规则与精度控制,确保计算结果符合业务预期。
  • 输入框失焦时自动格式化显示,提升用户输入容错能力。
  • 与数据库交互前应转换为小数存储,避免浮点精度丢失问题。

SKILL.md

Implementing Syncfusion WinForms PercentTextBox

The PercentTextBox is a textbox-derived control that enables users to display, enter, and manage percentage values in Windows Forms applications. It provides built-in formatting, validation, and data binding capabilities for percentage inputs.

When to Use This Skill

Use this skill when you need to:

  • Collect percentage values from users in a Windows Forms application
  • Display percentage data with consistent formatting
  • Validate percentage inputs within min/max bounds
  • Bind percentage values to data sources
  • Handle value changes and validation errors programmatically
  • Customize number formatting for percentages (decimal places, separators)
  • Support both percent and decimal representations of the same value

Component Overview

PercentTextBox derives from the Windows Forms TextBox and adds:

  • Automatic percentage formatting and validation
  • Support for multiple value representations (PercentValue, DoubleValue, BindableValue)
  • Min/Max constraint enforcement with validation
  • Customizable number formatting (decimal digits, separators)
  • Rich event system for value changes and validation
  • Null value handling
  • Keyboard input control for negative values

Documentation Navigation Guide

Select a reference based on what you need to accomplish:

Getting Started

📄 Read: references/getting-started.md

  • Installation and assembly references
  • Adding control via designer and code
  • Basic value initialization
  • Minimal working example

Value Management

📄 Read: references/value-management.md

  • PercentValue vs DoubleValue properties
  • BindableValue and BindablePercentValue for data binding
  • DefaultValue property usage
  • Value retrieval and conversion patterns

Constraints and Validation

📄 Read: references/constraints-and-validation.md

  • Setting minimum and maximum percentage values
  • Min/Max enforcement during validation
  • Null value handling (AllowNull, NullString, NullFormat)
  • ValidationError event handling
  • Validation error prevention strategies

Formatting and Display

📄 Read: references/formatting-and-display.md

  • Customizing decimal digits (PercentDecimalDigits)
  • Decimal and group separators
  • Group size configuration
  • Format customization examples
  • Number format patterns

Behavior and Input

📄 Read: references/behavior-and-input.md

  • Negative value input handling (NegativeInputPendingOnSelectAll)
  • ClipText property for unformatted text
  • User input processing
  • Keyboard behavior control

Events and Data Binding

📄 Read: references/events-and-data-binding.md

  • BindablePercentValueChanged event
  • BindableValueChanged event
  • DoubleValueChanged event
  • Data binding to BindablePercentValue
  • Event handler implementation patterns
  • Responding to value changes

Properties and API Reference

📄 Read: references/properties-and-api-reference.md

  • Complete property reference organized by category
  • Essential methods (ResetMaxValue, ResetMinValue, etc.)
  • Read-only properties (FormattedText, ClipText)
  • Quick lookup guide for common scenarios

Quick Start Example

Basic Setup (Designer)

  1. Drag PercentTextBox from toolbox to form
  2. Set PercentValue property to initial value (e.g., 50)
  3. Set MaxValue and MinValue for constraints
  4. Subscribe to BindablePercentValueChanged event to handle changes

Basic Setup (Code)

using Syncfusion.Windows.Forms.Tools;

// Create instance
PercentTextBox percentTextBox1 = new PercentTextBox();
this.Controls.Add(percentTextBox1);

// Set value
percentTextBox1.PercentValue = 50;

// Set constraints
percentTextBox1.MaxValue = 100;
percentTextBox1.MinValue = 0;

// Subscribe to value changed event
percentTextBox1.BindablePercentValueChanged += (sender, e) =>
{
    Console.WriteLine($"Percent: {percentTextBox1.PercentValue}%");
};

Common Patterns

Pattern 1: Initialize with Default Value and Constraints

var percentBox = new PercentTextBox();
percentBox.PercentValue = 25;
percentBox.MinValue = 0;
percentBox.MaxValue = 100;
percentBox.PercentDecimalDigits = 2;

Pattern 2: Bind to Data Source

percentTextBox1.DataBindings.Add("BindablePercentValue", dataSource, "PercentageField");

Pattern 3: Handle Validation Errors

percentTextBox1.ValidationError += (sender, e) =>
{
    MessageBox.Show($"Invalid input: {e.ErrorMessage}");
};

Pattern 4: Custom Number Format

percentTextBox1.PercentDecimalDigits = 3;
percentTextBox1.PercentDecimalSeparator = ".";
percentTextBox1.PercentGroupSeparator = ",";
percentTextBox1.PercentGroupSizes = new int[] { 2 };

Key Properties

PropertyTypePurpose
PercentValuedoubleGets/sets the percentage value (0-100)
DoubleValuedoubleGets/sets the decimal value (0-1)
BindablePercentValuedouble?Nullable percent value for data binding
BindableValuedouble?Nullable decimal value for data binding
MaxValuedoubleMaximum allowed value
MinValuedoubleMinimum allowed value
DefaultValuedoubleDefault value when reset
AllowNullboolAllows null/empty input
NullStringstringDisplay text when null
PercentDecimalDigitsintNumber of decimal places
PercentDecimalSeparatorstringDecimal separator character
PercentGroupSeparatorstringThousands separator
PercentGroupSizesint[]Group size for thousands
NegativeInputPendingOnSelectAllboolAllow negative on select-all

Common Use Cases

Use Case 1: Percentage of Total

Collect a percentage that must be between 0-100 and represents a portion of a whole.

  • Reference: value-management.md + constraints-and-validation.md

Use Case 2: Discount or Commission Rate

Accept percentage rates for calculations with specific decimal precision.

  • Reference: formatting-and-display.md + value-management.md

Use Case 3: Form with Validation

Build a form that prevents invalid percentage entries and shows errors.

  • Reference: constraints-and-validation.md + events-and-data-binding.md

Use Case 4: Data Binding Scenario

Bind PercentTextBox to a data model field with automatic synchronization.

  • Reference: events-and-data-binding.md + value-management.md

Next: Choose a reference file above based on your current need, or start with getting-started.md if new to PercentTextBox.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.26%
按下载量换算79

Claude

28.3%
按下载量换算65

Cursor

18.51%
按下载量换算43

Gemini CLI

9.13%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills