WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

JumpList doesn't update when opening a registered file using FileOpenPicker

Open fabianoriccardi opened this issue 1 year ago • 0 comments

Describe the bug

My app doesn't update the JumpList content (both in Start Menu and TaskBar) when opening a file using the FileOpenPicker. However, the Jump List is properly updated if I open the file (and my associated app) using a double click on the file icon.

Steps to reproduce the bug

  • Create a new app basen on Windows App SDK v1.5.4
  • replace the original Click event of the default button with:
private async void myButton_Click(object sender, RoutedEventArgs e)
{
    FileOpenPicker filePicker = new();
    var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
    WinRT.Interop.InitializeWithWindow.Initialize(filePicker, hwnd);

    filePicker.FileTypeFilter.Add(".lmest");
    var file = await filePicker.PickSingleFileAsync();
}

.lmest is my target extension

  • Register the extension lmest in Package.appxmanifest as below: extension screenshot

  • Compile and launch the app and try to open a .lmest file, then check the jumplist

Expected behavior

Expected JumpList:

jumplist

populated with the file you have opened through FileOpenPicker

Screenshots

No response

NuGet package version

Windows App SDK 1.5.4: 1.5.240607001

Packaging type

Packaged (MSIX)

Windows version

Windows 10 version 22H2 (19045, 2022 Update)

IDE

Visual Studio 2022

Additional context

I have read the following resources to try to solve my question:

fabianoriccardi avatar Jun 21 '24 21:06 fabianoriccardi