PinWindow() public static method

public static PinWindow ( IntPtr hWnd ) : void
hWnd System.IntPtr
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Toggles a window between being pinned and unpinned.
        /// </summary>
        public static void TogglePin(this Window window)
        {
            var handle = window.GetHandle();

            if (VirtualDesktop.IsPinnedWindow(handle))
            {
                VirtualDesktop.UnpinWindow(handle);
            }
            else
            {
                VirtualDesktop.PinWindow(handle);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Pins a window, showing it on all virtual desktops.
 /// </summary>
 public static void Pin(this Window window)
 {
     VirtualDesktop.PinWindow(window.GetHandle());
 }