我正在尝试使用 Windows 10 中的 JumpTask 从 TaskBar 运行自定义命令,但它不会启动链接的应用程序。但是,它正确显示了 JumpTask 链接及其图标。这是在 Win7/Win8 中正常工作的代码。
JumpTask signOutTask = new JumpTask
{
ApplicationPath = System.Reflection.Assembly.GetEntryAssembly().Location,
Title = XXX.Properties.Resources.AccountContextMenu_SignOutText,
Description = "Sign out of your account",
CustomCategory = "Actions",
Arguments = "/signout",
IconResourcePath = System.Reflection.Assembly.GetEntryAssembly().Location,
IconResourceIndex = 0
};
JumpList jumpList = new JumpList();
jumpList.JumpItems.Add(signOutTask);
jumpList.ShowFrequentCategory = false;
jumpList.ShowRecentCategory = false;
JumpList.SetJumpList(Application.Current, jumpList);