XAML
<span style="font-size:10px;"> <!--using System.Windows.Shell;--> <Application x:Class="WpfApplication.App" xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> <JumpList.JumpList> <JumpList> <JumpTask Title="Open Notepad" Description="Open the Notepad Application" IconResourcePath="C:\Windows\Notepad.exe" IconResourceIndex="0" ApplicationPath="C:\Windows\Notepad.exe" /> </JumpList> </JumpList.JumpList> </Application></span><span style="font-size:24px;color: rgb(255, 0, 0); "> </span> |
CSharp:
using System; private void Window_Loaded(object sender, RoutedEventArgs e) // 创建一个新的JumpList _JumpTask.Title = "Open Notepad"; // 获得当前的JumpList // 创建 JumpList // 添加JumpList // 更新 // 如果之前没有JumpList则加入 |