uwpwindows-10-universaljump-list

System "Pin to this list" and "Remove from this list" jump list context menu actions don't do anything for items in custom jump list grouping


I've created a custom jump list grouping of items for my UWP:

_jumpList = await JumpList.LoadCurrentAsync();

var mru = Windows.Storage.AccessCache.StorageApplicationPermissions.MostRecentlyUsedList;
string mruToken = mru.Add(file.FileInfo, file._id);

JumpListItem jumplistItem = JumpListItem.CreateWithArguments(mruToken, file.Name);
jumplistItem.GroupName = "Popular files";

_jumpList.Items.Add(jumplistItem);

await _jumpList.SaveAsync();

The jump list items do show up correctly when I right click on my app's icon whether on Start or the Taskbar (and I've a custom method to handle when they're left-clicked on which also works fine). The problem I'm having is if I right-click on any jump list item from this custom group, the "Pin to this list" and "Remove from this list" system context menu actions which appear for each item don't seem to do anything. I am not sure whether I need to write a custom override method to handle these calls as they're jump list items for a custom group, in which case I've no idea what this override method needs to be. Or something else I'm missing.


Solution

  • Unfortunately it seems that this functionality was not yet implemented by Microsoft into UWP apps and is currently available only for the system-managed default group of items.

    You can create named groups of jumplist items, but that will cause the pin button to be displayed albeit it is not functional.

    If you don't want to display the pin button, you will have to let the items in the default group (by not setting the group name):

    JumpListItem jumplistItem = JumpListItem.CreateWithArguments(mruToken, file.Name);
    
    //comment this out
    //jumplistItem.GroupName = "Popular files"; 
    
    _jumpList.Items.Add(jumplistItem);
    
    await _jumpList.SaveAsync();
    

    This however means, that the item will appear under the group name Tasks. The advantage is however, that the pin button will not be displayed.

    enter image description here