예제 #1
0
 /// <summary>
 /// An extension to the Window class to get the window placement.
 /// </summary>
 /// <param name="window">The window to place.</param>
 /// <returns>The placement of the window.</returns>
 public static WINDOWPLACEMENT GetPlacement(this Window window)
 {
     return(WindowPlacement.GetPlacement(new WindowInteropHelper(window).Handle));
 }
예제 #2
0
 /// <summary>
 /// An extension to the Window class to set the window placement.
 /// </summary>
 /// <param name="window">The window to place.</param>
 /// <param name="placement">The placement of the window.</param>
 public static void SetPlacement(this Window window, WINDOWPLACEMENT placement)
 {
     WindowPlacement.SetPlacement(new WindowInteropHelper(window).Handle, placement);
 }