#nullable enable using System.Globalization; using Microsoft.Win32; namespace ReminderOrganizer.Core { /// Windows settings the app follows until the user picks something (theme). public static class SystemPrefs { public static bool IsDarkMode() { try { using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"); return key?.GetValue("AppsUseLightTheme") is int v && v == 0; } catch { return true; } } } }