Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Per-monitor, DPI-aware applications render incorrectly if the target framework version is earlier than 4.6.2


Symptoms

When you run a per-monitor, DPI-aware Windows Presentation Foundation (WPF) application on a high DPI setting (greater than 100 percent), the application is displayed at 100 percent DPI. This issue occurs if the target framework version of the application is earlier than 4.6.2, or if the operating system is earlier than Windows 10 Desktop Preview.

This issue also occurs in the XAML designer for UWP on Windows 8.1 applications in Visual Studio 2013 and Visual Studio 2015.

↑ Back to the top


Cause

This issue occurs because of a recent regression that was introduced by the per-monitor, DPI-aware changes in WPF.

↑ Back to the top


Resolution

To work around this issue, add the following element under the <runtime> section in the app.config file of your application:

<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>

↑ Back to the top


References

For more information about the Microsoft .NET Framework 4.6.2 Preview, see the .NET Framework 4.6.2 Preview known issues.

↑ Back to the top


Keywords: kbqfe, kbsurveynew, kbtshoot, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 3152331
Revision : 1
Created on : 1/7/2017
Published on : 3/30/2016
Exists online : False
Views : 56