winforms-expert
यह क्या करती है
यह स्किल .NET में Windows Forms डेस्कटॉप ऐप बनाने, बदलने और डीबग करने में मदद करती है। यह उन डेवलपर्स के लिए है जो फ़ॉर्म, कंट्रोल और Visual Studio डिज़ाइनर के साथ काम करते हैं और जिन्हें डिज़ाइनर फ़ाइलें संपादन-योग्य रखनी हैं।
कब इस्तेमाल करें
- ✓जब किसी Windows Forms फ़ॉर्म, यूज़र कंट्रोल या डिज़ाइनर फ़ाइल को बनाना या बदलना हो।
- ✓जब WinForms ऐप में लेआउट, डेटा बाइंडिंग या DataGridView की समस्या हो।
- ✓जब WinForms ऐप बैकग्राउंड काम से स्क्रीन अपडेट करता हो और सही थ्रेडिंग चाहिए।
Skill का लिंक
https://github.com/dotnet/skills/blob/main/plugins/dotnet-winforms/skills/winforms-expert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Windows Forms फ़ॉर्म में सर्च बॉक्स और DataGridView जोड़िए, और पक्का कीजिए कि डिज़ाइनर सही तरह से खुलता रहे।”
हर हफ़्ते 5 नई skills, 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:
- Run that narrow validator first and fix every failure it attributes to the change.
- Run the focused project build after the validator passes.
- If the build or any later edit changes source, rerun the narrow validator.
- 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
InitializeComponentandDispose. - 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/UserControlmust 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-custom-agent
5.8kयह आपके एजेंट को VS Code के custom agent फ़ाइलें बनाने देती है, जिनके अपने tools, निर्देश और दूसरे agents को handoffs होते हैं।
create-skill
5.8kयह आपके एजेंट को सही नाम, साफ़ trigger विवरण और मानक के अनुसार SKILL.md फ़ाइल वाली नई agent skill बनाने में मदद करती है।
csharp-scripts
5.8kयह आपके एजेंट को .NET command line टूल से एक छोटा C# प्रोग्राम एकल फ़ाइल के रूप में चलाने देती है, पूरा प्रोजेक्ट बनाए बिना।
dotnet-pinvoke
5.8kयह आपके एजेंट को .NET से native C या C++ libraries सही तरीके से कॉल करने में मदद करती है, जिसमें signatures, string संभालना, memory और सुरक्षित handles शामिल हैं।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।