コード例 #1
0
 public static void SetWpfWindowPlacement(Window window, WindowPlacementStruct wpStruct)
 {
     if (window == null)
     {
         throw new ArgumentNullException(nameof(window));
     }
     SetWindowPlacement(new WindowInteropHelper(window).Handle, ref wpStruct);
 }
コード例 #2
0
        public static WindowPlacementStruct GetWpfWindowPlacement(Window window)
        {
            if (window == null)
            {
                throw new ArgumentNullException(nameof(window));
            }
            WindowPlacementStruct placement = new WindowPlacementStruct();

            GetWindowPlacement(new WindowInteropHelper(window).Handle, out placement);
            return(placement);
        }
コード例 #3
0
 private static extern bool GetWindowPlacement(IntPtr hWnd, out WindowPlacementStruct lpwndpl);
コード例 #4
0
 private static extern bool SetWindowPlacement(IntPtr hWnd, [In] ref WindowPlacementStruct lpwndpl);