winforms-ui-control-naming

Applies repository naming conventions to WinForms controls and event handlers in C# forms.

Updated Aug 24, 2026
One-click install
npx skills add https://github.com/aggutierrez98/TP-TD --skill winforms-ui-control-naming-aggutierrez98
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: winforms-ui-control-naming
Source: https://github.com/aggutierrez98/TP-TD/tree/main/.agents/skills/winforms-ui-control-naming
Command: npx skills add https://github.com/aggutierrez98/TP-TD --skill winforms-ui-control-naming-aggutierrez98

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? WinForms projects often accumulate inconsistent control names like button1 or label2, making forms hard to read and maintain. This Skill enforces the repository's naming convention so every visual control uses a required prefix and every event handler follows the <controlName>_<Event> pattern. ## Core Features & Use Cases - Prefix-based control naming: Maps control types to prefixes such as txtb for TextBox, dgv for DataGridView, btn for Button, lbl for Label, pb for PictureBox, and cmb for ComboBox. - Handler naming rule: Ensures event handlers use the <controlName>_<Event> format, for example btnIngreso_Click or dgvUsuarios_SelectionChanged. - Paired rename checklist: Guides updates across .cs and .Designer.cs files, including field declarations, Name assignments, InitializeComponent, and event subscriptions. - Use Case: When adding a login button to a WinForms form, the Skill renames it to btnIngreso, wires the handler as btnIngreso_Click, and updates all references before recompiling. ## Quick Start Use the winforms-ui-control-naming skill to rename the controls and event handlers in my Login form according to the repository convention.

Frequently Asked Questions about winforms-ui-control-naming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I name WinForms controls consistently in C#?▼

Name WinForms controls using a type prefix plus a short functional description, such as `txtbNickname` for a TextBox or `btnIngreso` for a Button. Event handlers follow the `<controlName>_<Event>` pattern, like `btnIngreso_Click`.

What prefixes should I use for WinForms control names?▼

Use `txtb` for TextBox, `dgv` for DataGridView, `lbl` for Label, `lstb` for ListBox, `btn` for Button, `pb` for PictureBox, and `cmb` for ComboBox. Combine the prefix with a short, function-oriented description.

How do I rename a WinForms control without breaking the form?▼

Rename in pairs across the `.cs` and `.Designer.cs` files: update the field declaration, the `Name = "..."` assignment, references inside `InitializeComponent`, and all usages in the code-behind. Recompile the solution afterward to catch missed references.

Should the event suffix go on the control name or the handler?▼

The event suffix applies only to the handler, not the control's base name. For example, the control is named `btnIngreso` while its click handler is `btnIngreso_Click`, and the event subscription must reference the handler name.

Why does my WinForms form break after renaming a control?▼

Breakage usually happens when the rename misses the `Name` property in `InitializeComponent`, the field declaration in `.Designer.cs`, or an event subscription. Update all of these together and rebuild the solution to surface any remaining stale references.