JumpLists not working in C # application

I am trying to use Recent and Frequent JumpLists in my C # application. I am using Windows Codepack v1.1 (http://code.msdn.microsoft.com/WindowsAPICodePack). I initialize JumpLists every time the application starts, and I AddRecent () in JumpList every time I open a project in the application.

Something fails because JumpLists just don't appear when you right-click the application icon in the taskbar. I have one file that appears once, but that's it!

Initialization:

private void InitializeJumpLists() { if (TaskbarManager.IsPlatformSupported) { JumpList recentJumpList = null; JumpList frequentJumpList = null; TaskbarManager.Instance.ApplicationId = Application.ProductName; recentJumpList = JumpList.CreateJumpList(); recentJumpList.KnownCategoryToDisplay = JumpListKnownCategoryType.Recent; recentJumpList.Refresh(); frequentJumpList = JumpList.CreateJumpList(); frequentJumpList.KnownCategoryToDisplay = JumpListKnownCategoryType.Frequent; frequentJumpList.Refresh(); } } 

Opening of the project:

  private void OpenProject(string path, bool isFromRecentFilesList) { DialogResult result = ConfirmProjectClosing(); if (result == DialogResult.Yes) Save(); else if (result == DialogResult.Cancel) return; using (new Wait()) { //Code here opens the project, etc. //Try to add the file to the Jump List. if (TaskbarManager.IsPlatformSupported) JumpList.AddToRecent(path); //Code here finished up. } } 

What am I missing?

+4
source share
3 answers

This turned out to be a limitation of ClickOnce deployments. Using a typical installation project, after installation, jump lists work as expected.

+2
source

What happens on this page to the question you see?

+2
source

Have you registered the file extension in your application? (I was the missing part in my case to make it work)

0
source

Source: https://habr.com/ru/post/1333917/


All Articles