This commit is contained in:
seerge
2023-03-21 15:23:41 +01:00
parent 9ff572b8f6
commit 83b184a061
3 changed files with 12 additions and 20 deletions

View File

@@ -1,5 +1,4 @@
using GHelper;
using Microsoft.Win32;
using Microsoft.Win32;
using System.ComponentModel;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
@@ -26,7 +25,7 @@ namespace CustomControls
{
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
var registryValueObject = key?.GetValue("AppsUseLightTheme");
if (registryValueObject == null) return false;
return (int)registryValueObject <= 0;
}