public MainWindow() { InitializeComponent(); Topmost = true; LostKeyboardFocus += new KeyboardFocusChangedEventHandler(lostKeyboardFocus); Window window = Window.GetWindow(this); var wih = new WindowInteropHelper(window); IntPtr hWnd = wih.Handle; brightnessControl = new BrightnessControl(hWnd); InitializeSliders(brightnessControl.GetMonitors()); SourceChord.FluentWPF.ResourceDictionaryEx.GlobalTheme = SourceChord.FluentWPF.ElementTheme.Dark; var w = System.Windows.SystemParameters.PrimaryScreenWidth; var h = System.Windows.SystemParameters.PrimaryScreenHeight; var taskBarHeight = h - System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height; Top = h - HEIGHT - taskBarHeight; Left = w - WIDTH; var tray = new Tray(this); Hide(); }
public MainWindow() { InitializeComponent(); Window window = Window.GetWindow(this); var wih = new WindowInteropHelper(window); IntPtr hWnd = wih.Handle; brightnessControl = new BrightnessControl(hWnd); InitializeSliders(brightnessControl.GetMonitors()); }
public MainWindow() { InitializeComponent(); brightnessControl = new BrightnessControl(); InitializeSliders(brightnessControl.GetMonitors()); }