Exemplo n.º 1
0
 /// <summary>
 /// Assert the given a WINDOWPLACEMENT structure encoded as an XML string
 /// to a specified window.
 /// </summary>
 /// <param name="window">Window to be positioned.</param>
 /// <param name="placementXml">WINDOWPLACEMENT structure expressed as an XML string.</param>
 public static void SetPlacement(this Window window, string placementXml, bool hide)
 {
     WindowPlacement.SetPlacement(new WindowInteropHelper(window).Handle, placementXml, hide);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the calling Window to topmost
 /// </summary>
 /// <param name="window"></param>
 public static void SetTopmost(this Window window)
 {
     WindowPlacement.SetTopmost(new WindowInteropHelper(window).Handle);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Given a window handle, collect the placement information and return this information
 /// encoded within an XML string.
 /// </summary>
 /// <param name="window">Window for which WINDOWPLACEMENT values are to be determined.</param>
 /// <returns>XML string containing the placement values.</returns>
 public static string GetPlacement(this Window window)
 {
     return(WindowPlacement.GetPlacement(new WindowInteropHelper(window).Handle));
 }