コード例 #1
0
        /// <summary>
        /// Gets the current process' explicit application user model id.
        /// </summary>
        /// <returns>The app id or null if no app id has been defined.</returns>
        private string GetCurrentProcessAppId()
        {
            string appId = string.Empty;

            TaskbarNativeMethods.GetCurrentProcessExplicitAppUserModelID(out appId);
            return(appId);
        }
コード例 #2
0
 /// <summary>
 /// Sets the application user model id for a given window
 /// </summary>
 /// <param name="appId">The app id to set</param>
 /// <param name="window">Window that needs a specific application id</param>
 /// <remarks>AppId specifies a unique Application User Model ID (AppID) for the application or individual
 /// top-level window whose taskbar button will hold the custom JumpList built through the methods <see cref="Microsoft.WindowsAPI.Taskbar.JumpList"/> class.
 /// By setting an appId for a specific window, the window will not be grouped with it's parent window/application. Instead it will have it's own taskbar button.</remarks>
 public void SetApplicationIdForSpecificWindow(System.Windows.Window window, string appId)
 {
     // Left as instance method, to follow singleton pattern.
     TaskbarNativeMethods.SetWindowAppId((new WindowInteropHelper(window)).Handle, appId);
 }
コード例 #3
0
 /// <summary>
 /// Sets the current process' explicit application user model id.
 /// </summary>
 /// <param name="appId">The application id.</param>
 private void SetCurrentProcessAppId(string appId)
 {
     TaskbarNativeMethods.SetCurrentProcessExplicitAppUserModelID(appId);
 }
コード例 #4
0
 /// <summary>
 /// Sets the application user model id for an individual window
 /// </summary>
 /// <param name="appId">The app id to set</param>
 /// <param name="windowHandle">Window handle for the window that needs a specific application id</param>
 /// <remarks>AppId specifies a unique Application User Model ID (AppID) for the application or individual
 /// top-level window whose taskbar button will hold the custom JumpList built through the methods <see cref="Microsoft.WindowsAPI.Taskbar.JumpList"/> class.
 /// By setting an appId for a specific window, the window will not be grouped with it's parent window/application. Instead it will have it's own taskbar button.</remarks>
 public void SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId)
 {
     // Left as instance method, to follow singleton pattern.
     TaskbarNativeMethods.SetWindowAppId(windowHandle, appId);
 }