# Winforms

Build, maintain, or modernize Windows Forms applications with practical guidance on...

- Repository: https://github.com/managedcode/dotnet-skills (500 stars)
- Category: Design
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add managedcode/dotnet-skills --skill winforms -g -a claude-code -y`
Codex: `npx skills add managedcode/dotnet-skills --skill winforms -g -a codex -y`
Cursor: `npx skills add managedcode/dotnet-skills --skill winforms -g -a cursor -y`
Gemini CLI: `npx skills add managedcode/dotnet-skills --skill winforms -g -a gemini-cli -y`

## Description

Build, maintain, or modernize Windows Forms applications with practical guidance on designer-driven UI, event handling, data binding, MVP separation, and migration to modern .NET. USE FOR: working on Windows Forms UI, event-driven workflows, or classic LOB applications; migrating WinForms from .NET Framework to modern .NET; cleaning up oversized form code. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Windows Forms

## Trigger On

- working on Windows Forms UI, event-driven workflows, or classic LOB applications
- migrating WinForms from .NET Framework to modern .NET
- cleaning up oversized form code or designer coupling
- implementing data binding, validation, or control customization

## Workflow

1. **Respect designer boundaries**, never edit `.Designer.cs` directly; changes are lost on regeneration.
2. **Separate business logic from forms**, use MVP (Model-View-Presenter) pattern. Forms orchestrate UI; presenters contain logic; services handle data access.
   ```csharp
   // View interface, forms implement this
   public interface ICustomerView
   {
       string CustomerName { get; set; }
       event EventHandler SaveRequested;
       void ShowError(string message);
   }

The rest: https://github.com/managedcode/dotnet-skills/blob/HEAD/catalog/Frameworks/WinForms/skills/winforms/SKILL.md
