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

syncfusion-winforms-button同步融合 winforms 按钮

Agent Skill

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

总安装

710

周安装

29

GitHub Stars

公开资料未说明

下载量

227
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

用于处理 WinForms Button 相关的协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态进行整理。
  • 通过 GitHub 安装,需结合来源仓库文档使用。
  • 建议确认权限范围和维护状态后再使用。
  • syncfusion-winforms-button 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing Syncfusion Windows Forms SfButton

Welcome to the comprehensive guide for implementing and customizing the Syncfusion Windows Forms SfButton control. SfButton is an advanced button control that provides rich text, image support, extensive customization options, and professional theming capabilities.

When to Use This Skill

Use this skill whenever you need to:

  • Create interactive buttons in Windows Forms applications
  • Display text and images together on buttons
  • Customize button appearance for different states (hover, pressed, focused, disabled)
  • Implement rich text formatting in buttons
  • Apply themes and styling to buttons
  • Handle button click events and user interactions
  • Create icon-only or image-only buttons
  • Show tooltips on button hover
  • Set Accept or Cancel buttons for forms
  • Implement animated GIF images in buttons

Component Overview

SfButton is an advanced button control superior to the standard Windows Forms Button. Key capabilities include:

  • Rich Content: Display text, images, rich text, and animated GIFs
  • State-Based Customization: Customize appearance for hover, pressed, focused, and disabled states
  • Professional Theming: Built-in Office 2016 themes (Colorful, White, DarkGray, Black)
  • Text Control: Support for text wrapping, trimming with ellipsis, and rich text formatting
  • Auto-Sizing: Automatic button resizing based on content
  • Flexible Positioning: Control image and text alignment, positioning, and spacing
  • Event Support: Full support for click events, focus handling, and user interactions
  • Background Customization: Solid colors, gradients, and background images

Documentation Navigation Guide

Getting Started

📄 Read: references/getting-started.md

Start here to learn:

  • Assembly dependencies and NuGet installation
  • Adding SfButton to forms (designer and code)
  • Basic button setup with text and properties
  • Handling click events
  • First working example

Button Types & Content

📄 Read: references/button-types-and-content.md

Learn how to create different button styles:

  • Text and image buttons
  • Image-only and icon-only buttons
  • Text and image positioning using TextImageRelation
  • Image size customization
  • Rich text support and formatting
  • Text wrapping and ellipsis trimming
  • Content alignment (text and image)
  • Auto-sizing buttons

Appearance & Styling

📄 Read: references/appearance-and-styling.md

Master button styling and customization:

  • Solid color backgrounds
  • Gradient brush backgrounds
  • Background images with layouts
  • Customizing appearance by button state
  • Back color and fore color in all states
  • Image changes in hover, pressed, focused, disabled states
  • Border customization per state
  • Focus rectangle visibility
  • Rounded rectangle button implementation
  • Animated GIF images

Events & Interactions

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

Implement button interactions:

  • Click event handling
  • Setting Accept buttons for forms (ENTER key)
  • Setting Cancel buttons for forms (ESC key)
  • Tooltip support with SfToolTip
  • Focus and keyboard handling

Quick Start Example

Here's a minimal example to get started with SfButton:

using Syncfusion.WinForms.Buttons;
using System.Windows.Forms;

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        // Create and configure SfButton
        SfButton sfButton1 = new SfButton();
        sfButton1.Text = "Click Me";
        sfButton1.Font = new System.Drawing.Font("Segoe UI", 10F);
        sfButton1.Location = new System.Drawing.Point(50, 50);
        sfButton1.Size = new System.Drawing.Size(120, 40);

        // Add click event
        sfButton1.Click += SfButton1_Click;

        // Add to form
        this.Controls.Add(sfButton1);
    }

    private void SfButton1_Click(object sender, System.EventArgs e)
    {
        MessageBox.Show("Button clicked!");
    }
}

Common Patterns

Pattern 1: Button with Image and Text

sfButton1.Text = "Save";
sfButton1.Image = Image.FromFile(@"save-icon.png");
sfButton1.TextImageRelation = TextImageRelation.ImageBeforeText;
sfButton1.ImageSize = new Size(20, 20);

Pattern 2: Icon-Only Button

sfButton1.Text = "";  // Empty text
sfButton1.Image = Image.FromFile(@"icon.png");
sfButton1.ImageSize = new Size(24, 24);
sfButton1.Style.BackColor = Color.White;
sfButton1.Style.Border = null;

Pattern 3: Button with State-Based Colors

sfButton1.Style.BackColor = Color.LightBlue;
sfButton1.Style.ForeColor = Color.Black;
sfButton1.Style.HoverBackColor = Color.Blue;
sfButton1.Style.HoverForeColor = Color.White;
sfButton1.Style.PressedBackColor = Color.DarkBlue;
sfButton1.Style.PressedForeColor = Color.White;

Pattern 4: Auto-Sizing Button

sfButton1.Text = "Variable Length Content";
sfButton1.AutoSize = true;  // Auto-adjust to content
sfButton1.Font = new Font("Segoe UI", 11F);

Pattern 5: Themed Button

// In Program.cs Main():
SfSkinManager.LoadAssembly(typeof(Office2016Theme).Assembly);

// In form:
sfButton1.ThemeName = "Office2016Colorful";

Key Properties at a Glance

PropertyTypePurpose
TextstringButton display text
ImageImageButton image/icon
ImageSizeSizeDimensions of displayed image
TextImageRelationTextImageRelationPosition of image relative to text
TextAlignContentAlignmentText alignment within button
ImageAlignContentAlignmentImage alignment within button
AutoSizeboolAuto-fit button to content
AllowWrapTextboolEnable text wrapping
AutoEllipsisboolShow ellipsis for trimmed text
AllowRichTextboolEnable rich text formatting
BackgroundImageImageBackground fill image
FocusRectangleVisibleboolShow focus indicator rectangle
ThemeNamestringApply built-in theme
StyleButtonVisualStyleAccess appearance customization

Common Use Cases

  1. Save/Submit Button: Text with icon, colored background, hover effects
  2. Icon Toolbar: Image-only buttons arranged in rows
  3. Themed Dialog Buttons: Accept/Cancel with consistent theming
  4. Rich Text Buttons: Formatted text with custom colors
  5. Dynamic Buttons: Buttons that change appearance based on state
  6. Form Control Buttons: Accept button (ENTER), Cancel button (ESC)
  7. Multi-Content Buttons: Text above/below image with custom alignment

Next Steps

  1. ✅ Review the Getting Started guide to set up your first SfButton
  2. ✅ Choose a button style from Button Types & Content that matches your UI
  3. ✅ Apply styling from Appearance & Styling for professional look
  4. ✅ Implement interactions from Events & Interactions

Assembly Dependencies

Required assemblies for SfButton:

  • Syncfusion.Core.WinForms (Main assembly containing SfButton)
  • Syncfusion.Shared.Base (Shared base library)
  • Syncfusion.Office2016Theme.WinForms (for themes)

See Getting Started reference for detailed NuGet installation instructions.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.79%
按下载量换算74

Claude

30.01%
按下载量换算68

Cursor

17.93%
按下载量换算41

Gemini CLI

9.3%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills