public static void RestoreBorder(TopLevelWindow window)
 {
     window.Region = IntPtr.Zero;
     if (window.Maximized | window.Minimized)
     {
         unchecked
         {
             window.Styles = (window.Styles & ~(unchecked((int)(WindowStyles.Popup)))) | (int)(WindowStyles.Caption | WindowStyles.Border | WindowStyles.Sizebox);
         }
         window.ExStyles = (window.ExStyles & ~(int)WindowExtendedStyles.StaticEdge) | (int)WindowExtendedStyles.WindowEdge;
         window.Bounds = window.Screen.WorkingArea;
     }
     window.PostMessage(WindowMessages.Themechanged);
     window.FrameChanged();
 }
 public static void RestoreBorder(TopLevelWindow window)
 {
     window.Region = IntPtr.Zero;
     if (window.Maximized | window.Minimized)
     {
         unchecked
         {
             window.Styles = (window.Styles & ~(unchecked ((int)(WindowStyles.Popup)))) | (int)(WindowStyles.Caption | WindowStyles.Border | WindowStyles.Sizebox);
         }
         window.ExStyles = (window.ExStyles & ~(int)WindowExtendedStyles.StaticEdge) | (int)WindowExtendedStyles.WindowEdge;
         window.Bounds   = window.Screen.WorkingArea;
     }
     window.PostMessage(WindowMessages.Themechanged);
     window.FrameChanged();
 }
Beispiel #3
0
 public static void ForceParentCommand(TopLevelWindow window, SystemCommands HitTest)
 {
     TopLevelWindow.ReleaseCapture();
     window.Activate();
     window.PostMessage(WindowMessages.SysCommand, new IntPtr((int)HitTest), IntPtr.Zero);
 }
Beispiel #4
0
 public static void ForceParentCommand(TopLevelWindow window, SystemCommands HitTest)
 {
     TopLevelWindow.ReleaseCapture();
     window.Activate();
     window.PostMessage(WindowMessages.SysCommand, new IntPtr((int)HitTest), IntPtr.Zero);
 }