-
Notifications
You must be signed in to change notification settings - Fork 184
Update autoscale article for modern .NET DPI handling #2157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…de updates Co-authored-by: adegeo <[email protected]>
|
@copilot One thing I noticed is that it says it's configured through the project. While that is true, I believe you can still override it with the app manifest. |
Co-authored-by: adegeo <[email protected]>
Added a NOTE clarifying that app.manifest can still override the project file settings, though it's discouraged due to potential conflicts. The note links to the WFO0003 compiler warning documentation for more details. (63bc3bc) |
|
@copilot We should mention something about the designer: https://learn.microsoft.com/en-us/visualstudio/designers/disable-dpi-awareness?view=visualstudio |
…aware property Co-authored-by: adegeo <[email protected]>
Added a subsection about Visual Studio designer considerations, including the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR comprehensively rewrites the autoscale.md article to reflect how DPI handling works in modern .NET (6.0+) instead of .NET Framework. The update addresses a documentation gap where the article was incorrectly describing .NET Framework behavior as current .NET behavior.
Changes:
- Added new sections explaining modern .NET DPI configuration through project file properties
- Added detailed information about high DPI improvements in .NET 6, 7, and 8
- Added a section explaining differences between .NET Framework and modern .NET
- Applied Microsoft Style Guide transformations throughout the document
- Added AI-usage disclosure to frontmatter
| - **Per-monitor DPI awareness**—Applications dynamically adjust when moved between monitors with different DPI settings. | ||
| - **Improved scaling behavior**—Controls scale correctly when DPI changes, including nested controls and container controls (.NET 6+). | ||
| - **Form size scaling**—<xref:System.Windows.Forms.Form.MaximumSize%2A> and <xref:System.Windows.Forms.Form.MinimumSize%2A> properties scale based on the current monitor DPI settings (.NET 7+, enabled by default in .NET 8+). |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list items describing High DPI improvements are missing periods at the end of each item. According to the Microsoft Style Guide, list items that are more than three words must end with periods. The first three list items (lines 106-108) are complete sentences or phrases that are longer than three words, so they should all end with periods. Note that line 109 correctly ends with a colon because it introduces nested items.
| - Override the <xref:System.Windows.Forms.Control.ScaleChildren%2A> property to determine if their child controls should be scaled. | ||
|
|
||
| - Override the <xref:System.Windows.Forms.Control.GetScaledBounds%2A> method to adjust the bounds that the control is scaled to, but not the scaling logic. | ||
|
|
||
| - Override the <xref:System.Windows.Forms.Control.ScaleControl%2A> method to change the scaling logic for the current control. |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nested list items describing how child controls can modify their scaling behavior are missing periods at the end of each item. According to the Microsoft Style Guide, list items that are more than three words must end with periods. These list items are complete sentences, so they should all end with periods.
Co-authored-by: Copilot <[email protected]>
|
@copilot Change the recommendation to SystemAware. And it's also the default. |
Co-authored-by: adegeo <[email protected]>
Changed the recommendation from PerMonitorV2 to SystemAware and clarified that SystemAware is the default mode. Updated the description to explain that SystemAware queries for DPI once at application startup and uses that value throughout the application's lifetime for consistent scaling behavior. (fb635ad) |
Rewrite autoscale article to reflect current DPI settings for modern .NET
Summary of Changes
This PR completely rewrites the autoscale.md article to accurately reflect how DPI handling works in modern .NET (6.0+) instead of .NET Framework.
Latest Updates (addressing feedback)
PerMonitorV2toSystemAware, which is the default modeSystemAwarequeries for DPI once at application startup and uses that value throughout the application's lifetime for consistent scaling behaviorForceDesignerDPIUnawareproperty for .NET 6+ projects in Visual Studio 2022 17.8+Technical Content Updates
Added "DPI awareness in modern .NET" section - Explains how modern .NET (6+) handles DPI configuration differently:
ApplicationHighDpiModeproject property (default:SystemAware)SystemAwaremode (the default) for consistent scaling behaviorForceDesignerDPIUnawarepropertyAdded "High DPI improvements" section - Details modern .NET improvements:
Added ".NET Framework differences" section - Clarifies configuration differences:
Updated existing content - Modernized all sections:
Microsoft Style Guide Compliance
Applied comprehensive style transformations per the Markdown Writing Style Instructions:
Voice and Tense
Word Choice
Punctuation and Formatting
Metadata
ai-usage: ai-assistedto frontmatterVerification Completed
Original prompt
✨ 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