Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

syncfusion-winforms-toggle-button同步融合 winforms 切换按钮

Agent Skill

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

总安装

679

周安装

28

GitHub Stars

公开资料未说明

下载量

222
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前需确认权限范围和维护状态,避免触发联网或文件读写操作。
  • syncfusion-winforms-toggle-button 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing Syncfusion Windows Forms Toggle Button

Welcome to the Toggle Button implementation guide. The Toggle Button control allows you to toggle between two contrasting states (Active and Inactive) with full customization options.

When to Use This Skill

Use this skill when you need to:

  • Create toggle buttons with two contrasting states (ON/OFF, YES/NO, etc.)
  • Customize the appearance of active and inactive states
  • Switch between text and image display modes
  • Implement custom styling with renderers
  • Handle toggle events and state changes
  • Build interactive Windows Forms applications with toggle controls

Component Overview

The Toggle Button is a Windows Forms control that presents two distinct states:

  • Active State: Typically used for "ON", "YES", or enabled conditions
  • Inactive State: Typically used for "OFF", "NO", or disabled conditions

Users can toggle between states by clicking the button or pressing the Space key.

Key Capabilities

  • Configurable Active and Inactive states with independent styling
  • Display modes: Text or Image
  • Event handling for state changes
  • Custom rendering support
  • Full color and border customization per state

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly dependencies and NuGet setup
  • Adding Toggle Button via Designer
  • Adding Toggle Button via code
  • Namespace imports and basic initialization

Toggle States Configuration

📄 Read: references/toggle-states.md

  • Understanding Active and Inactive states
  • Setting the toggle state programmatically
  • Customizing Active state (colors, text, hover effects)
  • Customizing Inactive state (colors, text, hover effects)
  • State transitions and toggling

Display Modes

📄 Read: references/display-modes.md

  • Text display mode configuration
  • Image display mode configuration
  • Switching between display modes
  • Use cases and best practices

Custom Styling and Renderers

📄 Read: references/custom-styling.md

  • Custom renderer implementation
  • Implementing the IToggleButtonRenderer interface
  • Assigning custom renderers
  • Advanced styling and appearance customization

Events and Interaction

📄 Read: references/events-and-interaction.md

  • Handling state change events
  • Mouse click interactions
  • Keyboard interactions (Space key)
  • Event patterns and best practices

Quick Start Example

Here's a minimal example to create and configure a Toggle Button:

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

// Create and add Toggle Button to form
ToggleButton toggleButton = new ToggleButton();
toggleButton.Location = new System.Drawing.Point(50, 50);
toggleButton.Size = new System.Drawing.Size(100, 40);
toggleButton.Name = "toggleButton1";

// Configure Active state
toggleButton.ActiveState.Text = "ON";
toggleButton.ActiveState.BackColor = Color.FromArgb(1, 115, 199);
toggleButton.ActiveState.ForeColor = Color.White;

// Configure Inactive state
toggleButton.InactiveState.Text = "OFF";
toggleButton.InactiveState.BackColor = Color.White;
toggleButton.InactiveState.ForeColor = Color.FromArgb(80, 80, 80);

// Set initial state
toggleButton.ToggleState = ToggleButtonState.Inactive;

// Add to form
this.Controls.Add(toggleButton);

Common Patterns

Pattern 1: Binary State Toggle

Create a simple ON/OFF toggle button for boolean settings:

toggleButton.ActiveState.Text = "ON";
toggleButton.InactiveState.Text = "OFF";
toggleButton.ToggleState = ToggleButtonState.Inactive;

Pattern 2: Yes/No Toggle

Create a decision toggle:

toggleButton.ActiveState.Text = "YES";
toggleButton.InactiveState.Text = "NO";

Pattern 3: State-Based Colors

Apply different colors to visually indicate state:

// Active - Green
toggleButton.ActiveState.BackColor = Color.FromArgb(34, 177, 76);
toggleButton.ActiveState.ForeColor = Color.White;

// Inactive - Red
toggleButton.InactiveState.BackColor = Color.FromArgb(192, 0, 0);
toggleButton.InactiveState.ForeColor = Color.White;

Pattern 4: Custom Text Per State

Provide descriptive labels for each state:

toggleButton.ActiveState.Text = "Enabled";
toggleButton.InactiveState.Text = "Disabled";

Key Properties

PropertyPurposeCommon Values
ToggleStateCurrent state of the buttonToggleButtonState.Active, ToggleButtonState.Inactive
ActiveState.TextText displayed when active"ON", "YES", "Enabled"
InactiveState.TextText displayed when inactive"OFF", "NO", "Disabled"
ActiveState.BackColorBackground color when activeColor values
InactiveState.BackColorBackground color when inactiveColor values
DisplayModeWhat to displayDisplayType.Text, DisplayType.Image
RendererCustom appearance renderingIToggleButtonRenderer implementation

Assembly Dependencies

To use Toggle Button, add these assemblies to your project:

  • Syncfusion.Grid.Base
  • Syncfusion.Grid.Windows
  • Syncfusion.Shared.Base
  • Syncfusion.Shared.Windows
  • Syncfusion.Tools.Base
  • Syncfusion.Tools.Windows

Next Steps

  1. Start with Getting Started - Install dependencies and add the control
  2. Configure States - Customize active and inactive appearance
  3. Choose Display Mode - Text or image display
  4. Add Styling - Apply custom renderers if needed
  5. Handle Events - Respond to state changes in your application

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.22%
按下载量换算80

Claude

30.13%
按下载量换算67

Cursor

19.56%
按下载量换算43

Gemini CLI

9.13%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills