GetAppId() public static method

public static GetAppId ( IntPtr hWnd ) : string
hWnd System.IntPtr
return string
Beispiel #1
0
        /// <summary>
        /// Unpins an application.
        /// </summary>
        public static void Unpin(this Application app)
        {
            var appId = ApplicationHelper.GetAppId(app.GetWindowHandle());

            if (appId == null)
            {
                return;
            }

            VirtualDesktop.UnpinApplication(appId);
        }
Beispiel #2
0
        /// <summary>
        /// Determines whether this application is pinned.
        /// </summary>
        public static bool IsPinned(this Application app)
        {
            var appId = ApplicationHelper.GetAppId(app.GetWindowHandle());

            if (appId == null)
            {
                return(false);
            }

            return(VirtualDesktop.IsPinnedApplication(appId));
        }
        public static void TogglePin(this Application app)
        {
            var appId = ApplicationHelper.GetAppId(app.GetWindowHandle());

            if (VirtualDesktop.IsPinnedApplication(appId))
            {
                VirtualDesktop.UnpinApplication(appId);
            }
            else
            {
                VirtualDesktop.PinApplication(appId);
            }
        }
 public static bool IsPinned(this Application app)
 {
     return(VirtualDesktop.IsPinnedApplication(ApplicationHelper.GetAppId(app.GetWindowHandle())));
 }
 public static void Unpin(this Application app)
 {
     VirtualDesktop.UnpinApplication(ApplicationHelper.GetAppId(app.GetWindowHandle()));
 }