/// <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); } }
/// <summary> /// Pins a window, showing it on all virtual desktops. /// </summary> public static void Pin(this Window window) { VirtualDesktop.PinWindow(window.GetHandle()); }