add DpiAware for demo

This commit is contained in:
NaBian committed 2021-01-27 23:32:15 +08:00
1 parent f56772447d
commit 2fadc54c53
13 files changed
+106 -23

No files matched your search

@@ -1057,4 +1057,7 @@
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Service\Data\" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)app.manifest" />
</ItemGroup>
</Project>
@@ -4,5 +4,6 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Langs"/>
</assemblyBinding>
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>
</configuration>
@@ -12,10 +12,22 @@ namespace HandyControlDemo.Tools
var netVersion = "NET 40";
#elif NET45
var netVersion = "NET 45";
#elif NET451
var netVersion = "NET 451";
#elif NET452
var netVersion = "NET 452";
#elif NET46
var netVersion = "NET 46";
#elif NET461
var netVersion = "NET 461";
#elif NET462
var netVersion = "NET 462";
#elif NET47
var netVersion = "NET 47";
#elif NET471
var netVersion = "NET 471";
#elif NET472
var netVersion = "NET 472";
#elif NET48
var netVersion = "NET 48";
#elif NET5_0
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="HandyControlDemo"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>