How do I get system-managed jump list to populate?

tetara 116 Reputation points
2019-10-31T19:11:30.653+00:00

The UWP JumpList class has the possibility of a system-managed jump list that display frequent or recent files (default setting), but I can't get said list to populate. What is it populated from? I thought it would use the files from StorageItemMostRecentlyUsedList, but calling StorageApplicationPermissions.MostRecentlyUsedList.Add(file) everytime I open a StorageFile doesn't show any element in the jump list. How does that work? (and can you document it) Previously reported at: https://github.com/MicrosoftDocs/winrt-api/issues/1275

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Fay Wang - MSFT 5,191 Reputation points
    2019-11-01T07:03:32.26+00:00

    >>"I thought it would use the files from StorageItemMostRecentlyUsedList"

    When using the JumpListSystemGroupKind.Recent to set the recent system-managed group, if you open your file and activate your app by just right-click the file and choose open with your app, in this way we do not need to use the MostRecentlyUsedList API, for more information, please check this article.

    But if you want to custom your jump list and make some files to appear in the recent list without activating from outside, you need to add the file into MostRecentlyUsedList. For more information, you can check the Scenario4_ChangeSystemGroup page in our official JumpList Sample.

    >>"I open a StorageFile doesn't show any element in the jump list"

    First, when you try to open the file, is the app successfully activated by your file? Only when the app is activated, the file will appear in the jump list. About how to declare the file type, you can refer to the following picture. About more details, you can check this document.
    alt text

    And if the app has been activated, have you ever had a file appearing in the jumplist? Do you mean that all of your files can not show in the Jump list or just some specified files can not be shown on the recent Jump list? It is possible that it will not display the full list of files because there are too many files recently accessed.

    Besides, please try to test our official sample and the Scenario4_ChangeSystemGroup page to see whether the recent access files will appear in the jump list or not. If the sample has the same issue, can you provide a simple demo that can be reproduced?

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. tetara 116 Reputation points
    2019-11-01T21:08:20.91+00:00

    Thanks @FayWangWicresoftNorthAmericaLtd-7624. I got the feature to work by specifying a file association in the app manifest file. Previously, even when opening a file from within the app it would not display in jump list, but with the file association Extension it now works as expected.

    I will request that the docs be updated to mention this requirement. Thanks!