본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)5.8k · #14650

winforms-expert

하는 일

이 스킬은 .NET의 Windows Forms 데스크톱 앱을 만들고, 바꾸고, 디버그하도록 돕습니다. 폼, 컨트롤, Visual Studio 디자이너를 다루며, 디자이너 파일이 계속 편집 가능해야 하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Windows Forms 폼, 사용자 컨트롤, 디자이너 파일을 만들거나 바꿔야 할 때.
  • ✓WinForms 앱에 레이아웃, 데이터 바인딩, DataGridView 문제가 있을 때.
  • ✓WinForms 앱이 백그라운드 작업으로 화면을 갱신하며 올바른 스레딩이 필요할 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-winforms/skills/winforms-expert/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/dotnet/skills/blob/main/plugins/dotnet-winforms/skills/winforms-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 Windows Forms 폼에 검색 상자와 DataGridView를 추가해 주세요. 디자이너가 여전히 올바르게 열리는지도 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 디자이너가 생성한 코드를 주 로직과 분리해 두고 변경을 하며, 프로젝트가 제공하는 자체 검사가 있으면 실행해 결과를 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

WinForms Expert

Purpose

Implement WinForms changes that compile, behave correctly at runtime, and remain editable in the Visual Studio Designer. Treat InitializeComponent and *.Designer.* as a serialization format, not ordinary application code; keep behavior in the main partial class and verify designer usability whenever the environment permits.

Execution Contract

Before editing, list the workspace root and locate any task-specific validator, test script, or documented verification command. Read its scenario selector and required arguments before choosing an implementation. After editing:

  1. Run that narrow validator first and fix every failure it attributes to the change.
  2. Run the focused project build after the validator passes.
  3. If the build or any later edit changes source, rerun the narrow validator.
  4. Report those commands separately from runtime UI and Designer round-trip checks.

A successful build never substitutes for an available layout, binding, serialization, or designer-safety validator. Do not finish after merely reading a validator or after a build succeeds.

Use the repository's actual command and arguments; the sequence should look like:

pwsh -NoProfile -File <task-validator.ps1> <scenario-arguments>
dotnet build <project> --nologo

Boundaries

Use this skill for:

  • Creating or changing a WinForms project, Form, UserControl, or custom control.
  • Editing designer-generated layout, event wiring, resources, or component fields.
  • Diagnosing a Form Designer load, serialization, scaling, binding, or toolbox problem.
  • Implementing WinForms-specific async, MVVM, accessibility, DPI, or dark-mode behavior.

Do not use it to:

  • Convert the application to another UI framework unless the user explicitly requests migration.
  • Rewrite working generated code for style alone.
  • Change the target framework, language version, SDK, package strategy, startup model, DPI mode, or application-wide theme unless required by the request.
  • Claim that the Visual Studio Designer works when it was not actually opened and exercised.

Inputs

Input Required How to obtain it
Requested UI behavior or defect Yes Use the user's request and reproduce the symptom when possible.
Project language and target framework Yes Inspect the project file; do not assume modern .NET or C#.
Existing Form/UserControl partial files Yes Find the main file, designer file, and matching .resx.
Repository conventions Yes Inspect nearby WinForms types, build scripts, analyzers, and package management.
Designer availability No Determine whether a compatible Visual Studio WinForms Designer can be opened.

Non-Negotiable Designer Contract

There are two code contexts:

Context Files Rule
Designer serialization *.Designer.cs, *.Designer.vb, InitializeComponent Use simple, deterministic statements the designer can parse and regenerate.
Application behavior Main partial class, services, view models Use language features supported by the project's TFM and language version.

In InitializeComponent and designer files:

  • Keep control/component construction, property assignments, collection additions, layout suspension/resumption, resource application, and named event-handler wiring.
  • Use class-level control/component fields. Do not add a control to Controls, Items, Columns, or another serialized collection through a local variable.
  • Use named event handlers defined in the main partial file. Never use lambdas or anonymous delegates in generated event wiring.
  • Do not add control flow (if, loops, switch, try/catch, lock, await, goto), local functions, expression-bodied logic, collection expressions, null-conditional or null-coalescing expressions, or other runtime decision logic.
  • Do not add business logic, data loading, validation, service calls, or methods other than the established generated members such as InitializeComponent and Dispose.
  • Preserve the generator's existing namespace style, qualification style, ordering, resources, and nullable treatment. Do not modernize generated syntax.
  • Preserve existing constructors that the designer relies on. A designer-instantiated Form/UserControl must have a usable parameterless construction path unless the project uses an established custom designer pattern.
  • Keep BeginInit/EndInit, `SuspendLayout
자주 묻는 질문

디자이너 코드를 왜 분리하나요?

디자이너 파일은 Visual Studio가 읽고 쓰는 형식이므로, 동작은 대신 주 클래스에 둡니다.

다른 UI 프레임워크에도 도움이 되나요?

아니요. Windows Forms만 다루며, WPF나 MAUI는 별도의 안내가 필요합니다.

빌드가 성공하면 충분한가요?

아니요. 프로젝트가 제공하는 경우 레이아웃, 바인딩, 디자이너 검사도 요청합니다.

상세 정보

작성자의 원본 설명

Create, modify, debug, or review Windows Forms applications only when the request contains a concrete Windows Forms marker. USE FOR: WinForms, Windows Forms, System.Windows.Forms, WinForms Form or UserControl designer files (*.Designer.cs or *.Designer.vb), Visual Studio WinForms Designer, TableLayoutPanel, BindingSource, DataGridView, Control.InvokeAsync, component-tray ownership, or custom control serialization. DO NOT USE FOR: WPF or WPF XAML, including Window.InputBindings, KeyBinding, commands, or DataContext; .NET MAUI; Avalonia; or any request where none of the listed Windows Forms mark

repo: dotnet/skills

인기도

GitHub 스타
5.8k
순위
#14650
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬