According to MSDN
An icon used with a JumpTask must be
available as a native resource.
you can only load icons from separate resource file. So, you need to set IconResourcePath
property to DLL with your icons. If you have few icons, use IconResourceIndex
property to specify needed one.
For example, next code
<Application x:Class="YourApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<JumpList.JumpList>
<JumpList>
<JumpTask Title="TargetApp"
Description="JumpTask to start TargetApp"
ApplicationPath="TargetApp.exe"
IconResourcePath="LibWithIcons.dll"
IconResourceIndex="2" />
</JumpList>
</JumpList.JumpList>
</Application>
will create JumpList and set to JumpTask item TargetApp third icon (null-based numeration) from LibWithIcons.dll. By the way, if JumpTask starts another application usually IconResourcePath
is set to the executable file of that application, so it icon will be displayed:
<JumpTask Title="TargetApp"
Description="JumpTask to start TargetApp"
ApplicationPath="TargetApp.exe"
IconResourcePath="TargetApp.exe"
IconResourceIndex="0" />
How to create icons DLL described on MSDN forums.