Exemplo n.º 1
1
 public DockManager(Window window, DockingSide dockingSide)
 {
     _basewindow = window;
     CurrentSide = dockingSide;
     _mouseHook = new MouseHook();
     _mouseHook.MouseMove += MouseHookOnMouseMove;
 }
Exemplo n.º 2
0
 public DockManager(Window window, DockingSide dockingSide)
 {
     _basewindow           = window;
     CurrentSide           = dockingSide;
     _mouseHook            = new MouseHook();
     _mouseHook.MouseMove += MouseHookOnMouseMove;
 }
Exemplo n.º 3
0
 public static Side DockingSideToSide(DockingSide dockingSide)
 {
     switch (dockingSide)
     {
         case DockingSide.Left:
             return Side.Left;
         case DockingSide.Right:
             return Side.Right;
         default:
             throw new ArgumentOutOfRangeException(nameof(dockingSide));
     }
 }
Exemplo n.º 4
0
        public static Side DockingSideToSide(DockingSide dockingSide)
        {
            switch (dockingSide)
            {
            case DockingSide.Left:
                return(Side.Left);

            case DockingSide.Right:
                return(Side.Right);

            default:
                throw new ArgumentOutOfRangeException(nameof(dockingSide));
            }
        }
Exemplo n.º 5
0
        private void ApplySide(DockingSide side)
        {
            switch (side)
            {
            case DockingSide.None:

                break;

            case DockingSide.Left:
            case DockingSide.Right:
                Left = side == DockingSide.Left ? WpfScreen.MostLeftX : WpfScreen.MostRightX - 300;
                var screen = WpfScreen.GetScreenFrom(new Point(Left, 0));
                Top    = screen.WorkingArea.Top;
                Height = screen.WorkingArea.Height;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 6
0
 private void OnDocked(DockingSide side)
 {
     Docked?.Invoke(this, new DockedEventArgs(side));
 }
Exemplo n.º 7
0
 public DockedEventArgs(DockingSide side)
 {
     DockingSide = side;
 }
Exemplo n.º 8
0
 private void OnDocked(DockingSide side)
 {
     Docked?.Invoke(this, new DockedEventArgs(side));
 }
Exemplo n.º 9
0
 public DockedEventArgs(DockingSide side)
 {
     DockingSide = side;
 }
Exemplo n.º 10
0
        private void ApplySide(DockingSide side)
        {
            switch (side)
            {
                case DockingSide.None:

                    break;
                case DockingSide.Left:
                case DockingSide.Right:
                    Left = side == DockingSide.Left ? WpfScreen.MostLeftX : WpfScreen.MostRightX - 300;
                    var screen = WpfScreen.GetScreenFrom(new Point(Left, 0));
                    Top = screen.WorkingArea.Top;
                    Height = screen.WorkingArea.Height;
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }