/syncfusion-winforms:syncfusion-winforms-autolabelfrom Syncfusion WinForms Controls
Guides 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.
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.
The AutoLabel control is a Label-inspired control that lets you pair a label with any other control. Once paired, the AutoLabel automatically repositions itself as the labeled control's position changes, ensuring labels and controls always stay synchronized.
Use the AutoLabel control when you need to:
Install-Package Syncfusion.Shared.Base
Add reference to:
Syncfusion.Shared.Base.dllusing System;
using System.Windows.Forms;
using Syncfusion.Windows.Forms.Tools;
namespace AutoLabelDemo
{
public partial class Form1 : Form
{
private AutoLabel autoLabel1;
private TextBoxExt textBoxExt1;
public Form1()
{
InitializeComponent();
// Create a control to label (e.g., TextBox)
textBoxExt1 = new TextBoxExt();
textBoxExt1.Location = new System.Drawing.Point(150, 50);
textBoxExt1.Size = new System.Drawing.Size(200, 20);
// Create AutoLabel
autoLabel1 = new AutoLabel();
autoLabel1.Text = "Username:";
autoLabel1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular);
// Pair the label with the control
autoLabel1.LabeledControl = textBoxExt1;
autoLabel1.Position = AutoLabelPosition.Left;
autoLabel1.Gap = 10;
// Add to form
this.Controls.Add(textBoxExt1);
this.Controls.Add(autoLabel1);
}
}
}
AutoLabel control from Toolbox to FormLabeledControl to your controlPosition and Gap propertiesThe AutoLabel pairs with any control through the LabeledControl property. Once paired, the label automatically tracks the control's position.
When the labeled control moves, the AutoLabel automatically adjusts its position based on the Position and Gap settings.
FlowLayout managers treat AutoLabel-labeled control pairs as a single unit, enabling powerful dynamic form layouts.
📄 Read: references/getting-started.md
📄 Read: references/positioning-spacing.md
📄 Read: references/appearance-theming.md
📄 Read: references/events.md
📄 Read: references/overview.md
// Create form fields with left-aligned labels
AutoLabel nameLabel = new AutoLabel();
nameLabel.Text = "Name:";
nameLabel.LabeledControl = nameTextBox;
nameLabel.Position = AutoLabelPosition.Left;
nameLabel.Gap = 10;
AutoLabel emailLabel = new AutoLabel();
emailLabel.Text = "Email:";
emailLabel.LabeledControl = emailTextBox;
emailLabel.Position = AutoLabelPosition.Left;
emailLabel.Gap = 10;
this.Controls.Add(nameTextBox);
this.Controls.Add(nameLabel);
this.Controls.Add(emailTextBox);
this.Controls.Add(emailLabel);
AutoLabel addressLabel = new AutoLabel();
addressLabel.Text = "Address:";
addressLabel.LabeledControl = addressTextBox;
addressLabel.Position = AutoLabelPosition.Top;
addressLabel.Gap = 5;
addressLabel.AutoSize = true;
AutoLabel customLabel = new AutoLabel();
customLabel.Text = "Custom:";
customLabel.LabeledControl = myControl;
customLabel.Position = AutoLabelPosition.Custom;
customLabel.DX = -100; // 100 pixels to the left
customLabel.DY = 15; // 15 pixels down from control top
using Syncfusion.Windows.Forms;
// Apply Office 2016 theme to all labels
SkinManager.SetVisualStyle(label1, VisualTheme.Office2016Colorful);
SkinManager.SetVisualStyle(label2, VisualTheme.Office2016Colorful);
SkinManager.SetVisualStyle(label3, VisualTheme.Office2016Colorful);
FlowLayoutPanel flowPanel = new FlowLayoutPanel();
flowPanel.FlowDirection = FlowDirection.TopDown;
flowPanel.Dock = DockStyle.Fill;
// FlowLayout treats AutoLabel + Control as one unit
flowPanel.Controls.Add(firstNameTextBox);
flowPanel.Controls.Add(firstNameLabel); // Paired with firstNameTextBox
flowPanel.Controls.Add(lastNameTextBox);
flowPanel.Controls.Add(lastNameLabel); // Paired with lastNameTextBox
// Labels automatically move with their controls
this.Controls.Add(flowPanel);
| Property | Type | Default | Description |
|---|---|---|---|
LabeledControl | Control | null | The control that this label is paired with |
Position | AutoLabelPosition | Left | Relative position: Left, Top, Side, Custom |
Gap | int | 0 | Horizontal and vertical gap between label and control |
DX | int | 0 | Horizontal distance from label left to control left |
DY | int | 0 | Vertical distance from label top to control top |
AutoSize | bool | false | Automatically resize based on font size |
Text | string | "" | Label text content |
TextAlign | ContentAlignment | TopLeft | Text alignment within label |
BackColor | Color | Control | Background color of the label |
ForeColor | Color | ControlText | Text color of the label |
Font | Font | - | Font for the label text |
| Position | Behavior |
|---|---|
| Left | Label appears to the left of the control |
| Top | Label appears above the control |
| Side | Label appears on the side (right) of the control |
| Custom | Manual positioning using DX and DY or mouse drag |
| Event | Description |
|---|---|
PropertyChanged | Fired when LabeledControl, Gap, or Position properties change |
Pair Before Adding: Set LabeledControl before adding to form for proper initialization
Use Gap for Spacing: Use the Gap property instead of manual positioning for consistent spacing
Choose Appropriate Position:
Left for horizontal formsTop for stacked/vertical formsCustom only when necessaryEnable AutoSize: Set AutoSize = true for labels that don't wrap text
FlowLayout Integration: Leverage FlowLayout to treat label-control pairs as units
Consistent Theming: Apply the same visual style to all AutoLabels in a form
Test Movement: Verify labels follow controls when controls are repositioned dynamically
Avoid Overlapping: Ensure Gap and positioning prevent label-control overlap
Supported themes via SkinManager:
SkinManager.SetVisualStyle(this.autoLabel1, VisualTheme.Office2016Colorful);
Issue: Label doesn't move with control
LabeledControl property is setIssue: Label positioning is off
Gap property for spacingDX and DY for fine-tuning if neededPosition property is set correctlyIssue: Label overlaps control
Gap valuePosition (e.g., Top instead of Left)Issue: Theme not applied
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-winforms113 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-banner-text-providerGuide for implementing Syncfusion WinForms BannerTextProvider (watermark text provider) control. Use this when working with watermark text, placeholder text, or hint text in editor controls. Covers setup, text modes (FocusMode/EditMode), color/font customization, and supported control types in Windows Forms applications.Other plugins' skills for the same job