示例#1
0
        private void WindowsAccentColorCheckBox_Changed(object sender, RoutedEventArgs e)
        {
            Globals.WindowsAccentColor = WindowsAccentColor.GetColorAsInt();

            if (!WindowInitialized)
            {
                return;
            }

            bool use = WindowsAccentColorCheckBox.IsChecked ?? false;

            SetUseAccentColor(use);
            GradientColorPicker.IsEnabled = !use;
        }
示例#2
0
        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == WM_TASKBARCREATED)
            {
                FindTaskbarHandles = true;
                handled            = true;
            }
            else if (msg == WM_DWMCOLORIZATIONCOLORCHANGED)
            {
                Globals.WindowsAccentColor = WindowsAccentColor.GetColorAsInt();  // TODO: use colour from wParam
                handled = true;
            }

            return(IntPtr.Zero);
        }