Skip to content

Commit 646836a

Browse files
authored
Fix Winforms High DPI sample configuration (#1495)
We got pinged on the WebView2 repo about a bug in the HighDPI sample that was confusing our users: MicrosoftEdge/WebView2Feedback#1700 (comment) Here's the related issue on the dotnet/docs-desktop repo: #1485 The fix is to change the <compatibility> tag with the correct <configuration> tag.
1 parent 0e1c06a commit 646836a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotnet-desktop-guide/framework/winforms/high-dpi-support-in-windows-forms.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ In addition, to configure high DPI support in your Windows Forms application, yo
4646
Windows Forms introduces a new [`<System.Windows.Forms.ApplicationConfigurationSection>`](/dotnet/framework/configure-apps/file-schema/winforms/index) element to support new features and customizations added starting with the .NET Framework 4.7. To take advantage of the new features that support high DPI, add the following to your application configuration file.
4747

4848
```xml
49-
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
49+
<configuration>
5050
<!-- ... other xml settings ... -->
5151

5252
<System.Windows.Forms.ApplicationConfigurationSection>
5353
<add key="DpiAwareness" value="PerMonitorV2" />
5454
</System.Windows.Forms.ApplicationConfigurationSection>
5555

56-
</compatibility>
56+
</configuration>
5757
```
5858

5959
> [!IMPORTANT]

0 commit comments

Comments
 (0)