Beispiel #1
0
        /// <summary>
        /// Sets theming for specified HWND
        /// </summary>
        public static int Set(IntPtr hwnd, Theme theme)
        {
            theme.ExtraAction?.Invoke(hwnd);
            var result = UxTheme.SetWindowTheme(hwnd, theme.Value, null);

            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Applies dark theming for win32 application
 /// </summary>
 public static void AllowDarkMode(IntPtr hwnd)
 {
     UxTheme.AllowDarkModeForWindow(hwnd, true);
 }