How to clear most recently used list in C# UWP application. StorageApplicationPermissions.MostRecentlyUsedList clear/remove doesn't work

Arunachalam, Senthil (External) 20 Reputation points
2025-05-19T20:30:34.6933333+00:00

How to clear most recently used list in C# UWP application

StorageApplicationPermissions.MostRecentlyUsedList.Clear() or StorageApplicationPermissions.MostRecentlyUsedList.Remove(token)

I can able to add new entries using below code and I can see the jump list item under "Recent". The list keeps on incrementing whenever I add a new item. I need to define the size of "Recent" programmatically.

StorageApplicationPermissions.MostRecentlyUsedList.Add(selectedFile, "", RecentStorageItemVisibility.AppAndSystem);

I tried below options, which does clear / remove the items.

StorageApplicationPermissions.MostRecentlyUsedList.Clear() or StorageApplicationPermissions.MostRecentlyUsedList.Remove(token)

My requirement is to generate a jump list that should have Recent with max 5 entries and the Custom group with max 5 entries. I don't want to use default group "Tasks"

something like this.

Recent

File1

File2

File3

File4

File5

Color

Blue

Red

Brown

Orange

White

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.