microsoft/managing-winforms-rendering
> Implements custom painting and rendering in WinForms using GDI and GDI+. Use when overriding OnPaint or OnPaintBackground, creating owner-drawn controls, working with Graphics objects, drawing primitives (DrawLine, DrawRectangle, FillEllipse), measuring or rendering text with TextRenderer or Graphics.DrawString, handling Paint events, using BufferedGraphics for double-buffering, or managing resource disposal for Pen, Brush, Font, and Graphics objects. Also triggers for "custom paint WinForms", "override OnPaint", "Graphics object", "GDI+ rendering", "DrawString", "TextRenderer", "owner-drawn control", "double buffer", and "dispose Graphics resources".
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill managing-winforms-rendering
Custom rendering in WinForms enables complete control over how controls paint themselves, from simple borders to complex visualizations using GDI+ (modern, object-oriented) and GDI (legacy, performance-optimized).
Use this skill when:
Read Detailed guide for comprehensive patterns, examples, and troubleshooting.
Take microsoft/managing-winforms-rendering from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.