Skip to content

Commit

Permalink
Added new manifest setting to support downlevel versions
Browse files Browse the repository at this point in the history
Modified the app.manifest files of projects so that they run as Per
Monitor DPI aware on Win 10 Anniversary Updates and higher, and as
System DPI aware on lower versions of Windows.
  • Loading branch information
Rohit Agrawal committed Aug 6, 2016
1 parent b8a194e commit 1619aef
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
Binary file not shown.
3 changes: 0 additions & 3 deletions PerMonitorDPI/FormattedTextExample/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>
6 changes: 5 additions & 1 deletion PerMonitorDPI/FormattedTextExample/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<!-- The combination of below two tags have the following effect :
1) Per-Monitor for >= RS1 (Windows 10 Anniversary Update)
2) System < RS1 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>

Expand Down
3 changes: 0 additions & 3 deletions PerMonitorDPI/ImageScaling/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>
6 changes: 5 additions & 1 deletion PerMonitorDPI/ImageScaling/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<!-- The combination of below two tags have the following effect :
1) Per-Monitor for >= RS1 (Windows 10 Anniversary Update)
2) System < RS1 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>

Expand Down
3 changes: 0 additions & 3 deletions PerMonitorDPI/TextFormatting/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>
6 changes: 5 additions & 1 deletion PerMonitorDPI/TextFormatting/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<!-- The combination of below two tags have the following effect :
1) Per-Monitor for >= RS1 (Windows 10 Anniversary Update)
2) System < RS1 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>

Expand Down
3 changes: 0 additions & 3 deletions PerMonitorDPI/WinFormsHost/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>
6 changes: 5 additions & 1 deletion PerMonitorDPI/WinFormsHost/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<!-- The combination of below two tags have the following effect :
1) Per-Monitor for >= RS1 (Windows 10 Anniversary Update)
2) System < RS1 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> PerMonitor</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>

Expand Down

0 comments on commit 1619aef

Please sign in to comment.