PinApplication() public static method

public static PinApplication ( string appId ) : void
appId string
return void
コード例 #1
0
        /// <summary>
        /// Pins an application, showing it on all virtual desktops.
        /// </summary>
        public static void Pin(this Application app)
        {
            var appId = ApplicationHelper.GetAppId(app.GetWindowHandle());

            if (appId == null)
            {
                return;
            }

            VirtualDesktop.PinApplication(appId);
        }
コード例 #2
0
        public static void TogglePin(this Application app)
        {
            var appId = ApplicationHelper.GetAppId(app.GetWindowHandle());

            if (VirtualDesktop.IsPinnedApplication(appId))
            {
                VirtualDesktop.UnpinApplication(appId);
            }
            else
            {
                VirtualDesktop.PinApplication(appId);
            }
        }
コード例 #3
0
 public static void Pin(this Application app)
 {
     VirtualDesktop.PinApplication(ApplicationHelper.GetAppId(app.GetWindowHandle()));
 }