JumpLists Not Working in C# App
- by Josh M.
Hi, I'm trying to use the Recent and Frequent JumpLists in my C# app. I'm using the Windows API Codepack v1.1 (http://code.msdn.microsoft.com/WindowsAPICodePack). I initialize the JumpLists every time the app starts and I AddRecent() to the JumpList every time I open a project in the app.
Something is missing becuase the JumpLists are simply not showing up when you right click the app's icon in the Taskbar. I got one file to show up 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 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?