docs-desktop icon indicating copy to clipboard operation
docs-desktop copied to clipboard

Update autoscale article for modern .NET DPI handling

Open Copilot opened this issue 4 months ago • 0 comments

The autoscale article documented .NET Framework DPI behavior, not modern .NET (6+). This updates it to reflect current DPI configuration patterns.

Changes

  • Added modern .NET DPI configuration section

    • Documents ApplicationHighDpiMode project property (default: SystemAware)
    • Recommends PerMonitorV2 for multi-monitor scenarios
    • Shows project file configuration vs legacy app.config
  • Added high DPI improvements section

    • Per-monitor awareness and dynamic scaling (.NET 6+)
    • Form size properties scale with DPI (.NET 7+/8+)
    • New events: DpiChanged, DpiChangedBeforeParent, DpiChangedAfterParent
  • Added .NET Framework differences section

    • Clarifies app.config vs project file configuration
    • Links to framework-specific documentation
  • Applied Microsoft Style Guide transformations

    • Active voice, contractions, imperative mood
    • Oxford commas, consistent list formatting
    • Added ai-usage: ai-assisted frontmatter

Example

Modern .NET configuration (project file):

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
  </PropertyGroup>
</Project>

Replaces .NET Framework configuration (app.config):

<System.Windows.Forms.ApplicationConfigurationSection>
  <add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
Original prompt

This section details on the original issue you should resolve

<issue_title>Rewrite autoscale article to reflect current DPI settings</issue_title> <issue_description>### Type of issue

Typo

Description

This article needs a rewrite. It currently reflects how DPI is working in .NET Framework and not in .NET 9+.

Page URL

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/forms/autoscale?view=netdesktop-9.0

Content source URL

https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/net/winforms/forms/autoscale.md

Document Version Independent Id

1aaf7424-82fb-ad59-b088-8ba2390fcd8c

Platform Id

f8ee52a9-4357-d487-4c01-bf6ae2a7feaf

Article author

@adegeo

Metadata

  • ID: 6bdfb610-861b-9a50-5a81-3416ec1d9cdc
  • PlatformId: f8ee52a9-4357-d487-4c01-bf6ae2a7feaf
  • Service: dotnet-desktop
  • Sub-service: winforms

Related Issues</issue_description>

<agent_instructions>DPI will operate slightly different between modern .NET and .NET Framework because of the changes that happened in the WinForms product for .NET 6+ releases. I think everything in this article was written for .NET Framework. We need to update the document to include how this also works on .NET. Check blog posts, whats new articles, and the WinForms source code for information about DPI changes.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Custom agent used: DocsEditor Edit and transform a document using the Microsoft Style Guide

  • Fixes dotnet/docs-desktop#2063

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
dotnet-desktop-guide/winforms/forms/autoscale.md dotnet-desktop-guide/winforms/forms/autoscale

Copilot avatar Nov 17 '25 21:11 Copilot