support for sync with system theme
This commit is contained in:
1 parent
d997aee5f7
commit
3da5662a90
10 files changed
+111
-46
No files matched your search
@@ -2,6 +2,7 @@
|
||||
using System.Windows.Media;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
using HandyControl.Tools.Helper;
|
||||
using HandyControl.Tools.Interop;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
@@ -14,17 +15,9 @@ namespace HandyControl.Controls
|
||||
EnableBlur(this);
|
||||
}
|
||||
|
||||
private static SystemVersionInfo GetSystemVersionInfo()
|
||||
{
|
||||
var osv = new InteropValues.RTL_OSVERSIONINFOEX();
|
||||
osv.dwOSVersionInfoSize = (uint) Marshal.SizeOf(osv);
|
||||
InteropMethods.Gdip.RtlGetVersion(out osv);
|
||||
return new SystemVersionInfo((int) osv.dwMajorVersion, (int) osv.dwMinorVersion, (int) osv.dwBuildNumber);
|
||||
}
|
||||
|
||||
internal static void EnableBlur(Window window)
|
||||
{
|
||||
var versionInfo = GetSystemVersionInfo();
|
||||
var versionInfo = SystemHelper.GetSystemVersionInfo();
|
||||
|
||||
if (versionInfo < SystemVersionInfo.Windows10 ||
|
||||
versionInfo >= SystemVersionInfo.Windows10_1903)
|
||||
|
||||
Reference in new issue
Block a user