--- name: wpf-high-dpi-analyzer description: Analyze and fix WPF applications for high DPI support, per-monitor DPI awareness, and scaling issues allowed-tools: Read, Grep, Glob, Bash tags: [wpf, dpi, scaling, accessibility, windows] --- # wpf-high-dpi-analyzer Analyze and fix WPF applications for high DPI support. This skill identifies DPI-related issues and provides fixes for per-monitor DPI awareness, bitmap scaling, and layout problems on high-resolution displays. ## Capabilities - Detect DPI awareness configuration issues - Find hardcoded pixel values - Identify bitmap scaling problems - Check for per-monitor DPI support - Analyze transform and layout issues - Review app.manifest DPI settings - Generate fixes for common DPI problems - Test multi-monitor DPI scenarios ## Input Schema ```json { "type": "object", "properties": { "projectPath": { "type": "string", "description": "Path to the WPF project" }, "targetDpiMode": { "enum": ["system", "per-monitor", "per-monitor-v2"], "default": "per-monitor-v2" }, "checkCategories": { "type": "array", "items": { "enum": ["manifest", "hardcoded-pixels", "bitmaps", "layouts", "transforms", "fonts"] }, "default": ["manifest", "hardcoded-pixels", "bitmaps", "layouts"] }, "generateFixes": { "type": "boolean", "default": true } }, "required": ["projectPath"] } ``` ## Output Schema ```json { "type": "object", "properties": { "success": { "type": "boolean" }, "dpiMode": { "type": "string" }, "issues": { "type": "array", "items": { "type": "object", "properties": { "severity": { "enum": ["critical", "high", "medium", "low"] }, "category": { "type": "string" }, "file": { "type": "string" }, "line": { "type": "number" }, "description": { "type": "string" }, "fix": { "type": "string" } } } }, "recommendations": { "type": "array", "items": { "type": "string" } } }, "required": ["success", "issues"] } ``` ## DPI Awareness Modes ### System DPI Aware (Legacy) ```xml true ``` ### Per-Monitor DPI Aware (Windows 8.1+) ```xml true/PM ``` ### Per-Monitor V2 DPI Aware (Windows 10 1703+) ```xml true/PM PerMonitorV2 ``` ## Common Issues and Fixes ### Hardcoded Pixel Values ```xml