private void Window_Loaded(object sender, RoutedEventArgs e) { IntPtr hwnd = new WindowInteropHelper(this).Handle; FocusManager.MakeUnfocusable(hwnd); FocusManager.HideFromToolBar(hwnd); Topmost = true; Opacity = 0; ContextMenu = new ContextMenu(); var HideButton = new MenuItem() { Header = "Hide" }; HideButton.Click += (s, ev) => { this.Visibility = Visibility.Collapsed; }; ContextMenu.Items.Add(HideButton); SessionManager.CurrentPlayer.HPUpdated += UpdateHP; SessionManager.CurrentPlayer.MPUpdated += UpdateMP; SessionManager.CurrentPlayer.STUpdated += UpdateST; SessionManager.CurrentPlayer.FlightEnergyUpdated += UpdateFlightEnergy; hpBar.Width = @base.Width; mpBar.Width = @base.Width; stBar.Width = @base.Width; flightBar.Width = dummyFlightBar.Width; }
private void Window_Loaded(object sender, RoutedEventArgs e) { IntPtr hwnd = new WindowInteropHelper(this).Handle; FocusManager.MakeUnfocusable(hwnd); FocusManager.HideFromToolBar(hwnd); if (Properties.Settings.Default.Transparent) { FocusManager.MakeTransparent(hwnd); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { IntPtr hwnd = new WindowInteropHelper(this).Handle; FocusManager.MakeUnfocusable(hwnd); FocusManager.HideFromToolBar(hwnd); //Opacity = 0; ContextMenu = new ContextMenu(); var HideButton = new MenuItem() { Header = "Hide" }; HideButton.Click += (s, ev) => { this.Visibility = Visibility.Collapsed; }; ContextMenu.Items.Add(HideButton); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //this.Top = Properties.Settings.Default.CooldownBarTop; //this.Left = Properties.Settings.Default.CooldownBarLeft; IntPtr hwnd = new WindowInteropHelper(this).Handle; FocusManager.MakeUnfocusable(hwnd); FocusManager.HideFromToolBar(hwnd); Topmost = true; ContextMenu = new ContextMenu(); var HideButton = new MenuItem() { Header = "Hide" }; HideButton.Click += (s, ev) => { this.Visibility = Visibility.Collapsed; }; ContextMenu.Items.Add(HideButton); }