private static void ChangeDocking(DockedMetroWindow dockWindow, bool isDocked)
 {
     if (dockWindow != null && dockWindow.IsDocked)
     {
         SetDocking(dockWindow, dockWindow.DockingType);
     }
 }
 private static void ChangeDocking(DockedMetroWindow dockWindow, DockType oldValue, DockType newValue)
 {
     if (dockWindow != null && dockWindow.IsDocked)
     {
         SetDocking(dockWindow, newValue);
     }
 }
        private static void SetDocking(DockedMetroWindow dockWindow, DockType docType)
        {
            switch (dockWindow.DockingType)
            {
            case DockType.TopLeft:
                SetDockingLeftTop(dockWindow);
                break;

            case DockType.BottomRight:
                SetDockingBottomRight(dockWindow);
                break;

            case DockType.BottomLeft:
                SetDockingBottomLeft(dockWindow);
                break;
            }
        }
 private static void SetDockingLeftTop(DockedMetroWindow dockWindow)
 {
     dockWindow.Top  = 0;
     dockWindow.Left = SystemParameters.PrimaryScreenWidth - dockWindow.ActualWidth;
 }
 private static void SetDockingBottomRight(DockedMetroWindow dockWindow)
 {
     dockWindow.Top  = SystemParameters.PrimaryScreenHeight - dockWindow.ActualHeight;
     dockWindow.Left = SystemParameters.PrimaryScreenWidth - dockWindow.ActualWidth;
 }