WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Most entries in the FileOpenPicker file type list are blank

Open lhak opened this issue 3 months ago • 10 comments

Describe the bug

All entries in file type selection list in the FileOpenPicker are blank except the "All files" entry.

Image

Steps to reproduce the bug

  1. Create a file picker according to the documentation.

Expected behavior

No response

Screenshots

No response

NuGet package version

Windows App SDK 1.8.0: 1.8.250907003

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

IDE

Visual Studio 2022

Additional context

No response

lhak avatar Sep 15 '25 17:09 lhak

Hi @lhak, Thank you for reporting this issue! To help us better understand and assist, could you please provide the following details:

  1. Code snippet
  2. System language – What is the language setting of your operating system?
  3. Encoding – What encoding are you using in your code? Also, what encoding are you using in your system?
  4. Although it is not displayed, does the Filtering function work?

We really appreciate for any information to help investigation!

DinahK-2SO avatar Oct 10 '25 07:10 DinahK-2SO

Hi @lhak, Thank you for reporting this issue! To help us better understand and assist, could you please provide the following details:

  1. Code snippet

I created a c# winui project (packaged) with Visual Studio 2022 and used the c# code from the documentation

  1. System language – What is the language setting of your operating system?

german or english. Both show the same issue.

  1. Encoding – What encoding are you using in your code? Also, what encoding are you using in your system?

The file where I added the code (MainWindow.xaml.cs) was created by the appsdk template. Format is "Windows 1252".

  1. Although it is not displayed, does the Filtering function work?> > We really appreciate for any information to help investigation!

Yes, filtering works as expected even though the descripts are not shown

lhak avatar Oct 12 '25 17:10 lhak

  1. Although it is not displayed, does the Filtering function work?> > We really appreciate for any information to help investigation!

Yes, filtering works as expected even though the descripts are not shown

Thanks @lhak , It looks like the content inside brackets might not be rendering properly in your app. Could you try one more thing? Please open any file in Notepad, then go to "File > Save As.", in the dialog opened, do you see the wildcards displayed within the brackets in the file type filters?

Image Image

DinahK-2SO avatar Oct 13 '25 05:10 DinahK-2SO

Yes, all other applications (and using the pickers from the Windows.Storage.Pickers namespace) work fine. I also tested on numerous machines and see the same issue on all of them.

lhak avatar Oct 13 '25 19:10 lhak

This is still broken in the latest 1.8 and 2.0 experimental results. When will it be fixed?

lhak avatar Nov 13 '25 11:11 lhak

Hi @lhak , Thanks for sharing this issue. I wasn’t able to reproduce it on my machine, but I’ll set up a VM to test further and see if we can identify what’s happening. I’ll post an update here.

DinahK-2SO avatar Nov 13 '25 18:11 DinahK-2SO

I think the issue is here

https://github.com/microsoft/WindowsAppSDK/blob/77e4d4ffe2e3225ad643d7d4f9b340af239ffc44/dev/Interop/StoragePickers/PickerCommon.cpp#L320C1-L322C47

The description of the file types is set to an empty string

lhak avatar Nov 14 '25 09:11 lhak

Hi @lhak , thanks for your prompt response!

  1. The code you found aims to hide the label part before parentheses, meanwhile, the content in parentheses should display the filter, as shown in the screenshot below.
Image

Because the one in parentheses is the actual active part, we hid the part before it to avoid showing duplicate content. However, it seems the parentheses are not displayed on your side, so I am wondering if hiding the first part was a good choice.

  1. To quickly unblock your progress,

the FileOpenPicker.FileTypeChoices in 2.0-experimental2 can be a mitigation, it allows us to customize both the label and filters.

DinahK-2SO avatar Nov 16 '25 13:11 DinahK-2SO

Oh I know what happend! The file name extension is not shown on your side!

Hey @lhak , would you please enable this? You will see the extensions in brackets then.

Image

And NICE Catch! This is indeed a subtle bug. I will add the label back to FileTypeFilters!

DinahK-2SO avatar Nov 16 '25 14:11 DinahK-2SO

@DinahK-2SO Yes, I can confirm that this is indeed the issue and toggling that option shows the labels

lhak avatar Nov 16 '25 17:11 lhak