MCPInstall

syncfusion-winforms-button

Guide developers to implement and customize the Syncfusion Windows Forms SfButton control for desktop applications. Use this when creating interactive buttons with text, images, styling, and theming in Windows Forms applications. Covers implementation, customization, and interaction handling.

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

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-button
  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-winforms-button 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 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.Controls;
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.

FAQ

What does the syncfusion-winforms-button skill do?

Guide developers to implement and customize the Syncfusion Windows Forms SfButton control for desktop applications. Use this when creating interactive buttons with text, images, styling, and theming in Windows Forms applications. Covers implementation, customization, and interaction handling.

How do I install syncfusion-winforms-button?

Run npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-button 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-winforms-button/ (personal) or .claude/skills/syncfusion-winforms-button/ (project).

Which AI agents can use syncfusion-winforms-button?

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-winforms-button 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-winforms-button?

It is published by syncfusion in syncfusion/winforms-ui-components-skills. It has 86 recorded installs.

More from syncfusion/winforms-ui-components-skills

View all →

syncfusion-winforms-datagrid

syncfusion/winforms-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winforms-common

syncfusion/winforms-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winforms-contextmenustrip

syncfusion/winforms-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winforms-licensing

syncfusion/winforms-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winforms-docking-manager

syncfusion/winforms-ui-components-skills

Open the skill to read its SKILL.md instructions.

syncfusion-winforms-listview

syncfusion/winforms-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