【问题标题】:Cant get rid off JumpTask item无法摆脱 JumpTask 项目
【发布时间】:2016-12-19 17:37:47
【问题描述】:

我只是在 WPA 应用程序中使用 JumpList。我已将此代码添加到我的App.xaml:

<JumpList.JumpList>
    <JumpList ShowRecentCategory="False" ShowFrequentCategory="False">

        <JumpTask Title="New Note" Description="Create new note"
                  Arguments="/new" CustomCategory="Actions"/>
    </JumpList>  
</JumpList.JumpList>

然后我决定不在我的应用程序中包含该功能,因此我删除了这些代码行,但是当我右键单击任务栏图标时,该项目仍在 JumpList 上。

我找到了指向从 %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\ 删除文件的解决方案,但没有帮助。

清理或重建项目没有帮助。

【问题讨论】:

  • 您是否尝试过将&lt;JumpList&gt; 留空并运行您的应用程序?
  • 理查德,非常感谢,成功了。将此解决方案发布为答案,我会接受。

标签: c# wpf windows visual-studio jump-list


【解决方案1】:

如 cmets 中所述,您需要在应用程序中保留一个空的 &lt;JumpList&gt; 并运行一次。然后,如果需要,您应该能够从标记中完全删除 &lt;JumpList&gt;。

如果&lt;JumpList&gt; 元素不存在,则更新跳转列表的代码永远不会执行,Windows 会继续使用之前的跳转列表。

【讨论】:

  • 这绝对适合我!! jumpList.JumpItems.Clear(); jumpList.JumpItems.Add(new JumpTask()); JumpList.SetJumpList(App.Current, jumpList);
猜你喜欢
  • 2014-03-21
  • 1970-01-01
  • 1970-01-01
  • 2016-06-05
  • 2012-10-14
  • 1970-01-01
  • 2015-04-06
  • 2013-06-20
  • 2015-10-03
相关资源
最近更新 更多