mcpbeat

Managing Winforms High Dpi Layout

microsoft/managing-winforms-high-dpi-layout

> Implements WinForms high-DPI fluent layouts using TableLayoutPanel, FlowLayoutPanel, and DPI-aware design patterns. Use when creating responsive form layouts that must scale across different DPI settings, implementing Per Monitor V2 (PerMonitorV2) DPI awareness, working with TableLayoutPanel.RowStyles/ColumnStyles, using FlowLayoutPanel for dynamic layouts, replacing fixed pixel positioning with container-based layout, troubleshooting DPI scaling issues, or structuring nested layout containers. Also triggers for "TableLayoutPanel", "FlowLayoutPanel", "high DPI WinForms", "PerMonitorV2", "DPI aware layout", "responsive WinForms", "scale UI", "AutoScaleMode", and "DPI scaling".

9k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
17
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill managing-winforms-high-dpi-layout

What comes with it

31 795 bytes besides the instruction
ref/detailed-guide.md

The instruction itself

6 sections, as written by the author

WinForms High-DPI Fluent Layout Guide

Fluent layout strategies for scalable, DPI-aware WinForms form designs using TableLayoutPanel and FlowLayoutPanel. All layout code shown here must follow the managing-winforms-designer-code skill rules — control configuration belongs in InitializeComponent inside the .Designer.cs file.

When to Use This Skill

Use this skill when:

  • Designing new or modifying existing forms or UserControls with responsive layouts
  • Implementing fluent layout scenarios using TableLayoutPanel or FlowLayoutPanel
  • Ensuring DPI compatibility, specifically for Per Monitor V2 High-DPI modes
  • Creating complex nested layouts with proper scaling
  • Implementing fullscreen or presentation modes
  • Designing modal dialogs with proper layout structure
  • Reviewing whether WinForms Forms/UserControls are "designed according to standard", "not designed properly", "badly designed", "layout looks wrong", or similar; pair this with managing-winforms-designer-code so Designer serialization rules are checked too.

Designer Compatibility Note

CRITICAL: All control instantiation, property assignment, and layout wiring shown in this skill belongs inside InitializeComponent in the .Designer.cs file. Do NOT extract control configuration into helper methods like CreateDetailsPanel() or SetupLayout() — this breaks the WinForms Designer. See the managing-winforms-designer-code skill for the authoritative rules.

  • WinForms Designer Code
  • WinForms Development
  • WinForms Custom Controls and UserControls
  • WinForms Rendering
  • WinForms Data Binding

Detailed Guidance

Read Detailed guide for comprehensive patterns, examples, and troubleshooting.

Workflow

  • Confirm the scenario matches the triggers in this skill.
  • Apply the baseline pattern from this file.
  • Read Detailed guide for advanced or edge-case handling.
  • Validate changes with an actual build and runtime check.

How to use it

Copy the folder

Take microsoft/managing-winforms-high-dpi-layout from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

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.