private void bdrThumbInner_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton == MouseButton.Left)
            {
                if (_window == null)
                {
                    return;
                }

                if (Keyboard.IsKeyDown(Key.LeftShift) ||
                    Keyboard.IsKeyDown(Key.RightShift))
                {
                    ShellHelper.StartProcess(_window.IsUWP ? "appx:" + _window.AppUserModelID : _window.WinFileName);
                    return;
                }

                if (_window.State == ApplicationWindow.WindowState.Active)
                {
                    _window.Minimize();
                }
                else
                {
                    _window.BringToFront();
                }

                ThumbWindow.Close();
            }
        }
        public void SelectWindow()
        {
            if (Window != null)
            {
                if (Keyboard.IsKeyDown(Key.LeftShift) ||
                    Keyboard.IsKeyDown(Key.RightShift))
                {
                    ShellHelper.StartProcess(Window.WinFileName);
                    return;
                }

                if (Window.State == ApplicationWindow.WindowState.Active)
                {
                    Window.Minimize();
                }
                else
                {
                    Window.BringToFront();
                }
            }

            closeThumb(true);
        }
 private void miMinimize_Click(object sender, RoutedEventArgs e)
 {
     _window?.Minimize();
 }
Exemple #4
0
 private void MinimizeMenuItem_OnClick(object sender, RoutedEventArgs e)
 {
     Window?.Minimize();
 }