/syncfusion-winforms:syncfusion-winforms-toggle-buttonfrom Syncfusion WinForms Controls
Implement the Syncfusion Windows Forms Toggle Button control for toggling between two states. Use this skill when users need to create toggle buttons with customizable active/inactive states, display modes, custom styling, and event handling. This skill covers toggle button implementation, state management, and customization in Windows Forms applications.
Ships in Syncfusion WinForms Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
Use this skill when you need to:
The Toggle Button is a Windows Forms control that presents two distinct states:
Users can toggle between states by clicking the button or pressing the Space key.
📄 Read: references/getting-started.md
📄 Read: references/toggle-states.md
📄 Read: references/display-modes.md
📄 Read: references/custom-styling.md
📄 Read: references/events-and-interaction.md
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);
Create a simple ON/OFF toggle button for boolean settings:
toggleButton.ActiveState.Text = "ON";
toggleButton.InactiveState.Text = "OFF";
toggleButton.ToggleState = ToggleButtonState.Inactive;
Create a decision toggle:
toggleButton.ActiveState.Text = "YES";
toggleButton.InactiveState.Text = "NO";
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;
Provide descriptive labels for each state:
toggleButton.ActiveState.Text = "Enabled";
toggleButton.InactiveState.Text = "Disabled";
| Property | Purpose | Common Values |
|---|---|---|
ToggleState | Current state of the button | ToggleButtonState.Active, ToggleButtonState.Inactive |
ActiveState.Text | Text displayed when active | "ON", "YES", "Enabled" |
InactiveState.Text | Text displayed when inactive | "OFF", "NO", "Disabled" |
ActiveState.BackColor | Background color when active | Color values |
InactiveState.BackColor | Background color when inactive | Color values |
DisplayMode | What to display | DisplayType.Text, DisplayType.Image |
Renderer | Custom appearance rendering | IToggleButtonRenderer implementation |
To use Toggle Button, add these assemblies to your project:
Syncfusion.Grid.BaseSyncfusion.Grid.WindowsSyncfusion.Shared.BaseSyncfusion.Shared.WindowsSyncfusion.Tools.BaseSyncfusion.Tools.WindowsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-winformsOther plugins' skills for the same job
113 skills in this plugin
/syncfusion-winforms-ai-assistviewGuide for implementing Syncfusion Windows Forms AI AssistView (SfAIAssistView) for building conversational AI interfaces in desktop applications. Use this when creating chat interfaces, AI assistants, or chatbots with Windows Forms. Supports OpenAI and Azure OpenAI integration, typing indicators, chat suggestions, message bubbles, custom views, input toolbar with attachments, response toolbar actions, and stop responding for interactive messaging experiences./syncfusion-winforms-autocompleteGuides implementation of the Syncfusion WinForms AutoComplete control for text input with auto-suggestion functionality. Use when users want to add autocomplete textboxes, implement auto-suggestion features, create search boxes with suggestions, enable URL/email autocomplete, or build type-ahead search functionality in Windows desktop applications. Covers data binding, customization, filtering, multi-column dropdowns, events, and all AutoComplete-specific features./syncfusion-winforms-autolabelGuides implementation of the Syncfusion WinForms AutoLabel control for automatic label positioning with form controls. Use when users want to add labels that automatically reposition when controls move, create form layouts with paired label-control units, implement complex form designs with FlowLayout, or ensure labels stay synchronized with their associated controls. Covers labeling controls, positioning, spacing, size settings, theming, and events.