Describe the bug
In WinUI 3 it is needed to do the following call to initialize a picker dialog:
WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd);
It works just fine in full trust mode but fails when it is called in partial trust/inside an AppContainer (access denied exception).
This is terrible news because it means that WinUI 3 can either use the WinRT file dialogs OR run in partial trust. But NOT both at the same time.
Steps to reproduce the bug
- Create a packaged WinUI 3 app with the default template
- Change
Package.appxmanifest such that the app runs in partial mode
- Optional: add the
broadFileSystemAccess capability
- Test the FilePicker code snippet from the WinUI 3 Gallery: winui3gallery://item/FilePicker
Expected behavior
The file dialogs should open just as expected.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
Describe the bug
In WinUI 3 it is needed to do the following call to initialize a picker dialog:
It works just fine in full trust mode but fails when it is called in partial trust/inside an AppContainer (access denied exception).
This is terrible news because it means that WinUI 3 can either use the WinRT file dialogs OR run in partial trust. But NOT both at the same time.
Steps to reproduce the bug
Package.appxmanifestsuch that the app runs in partial modebroadFileSystemAccesscapabilityExpected behavior
The file dialogs should open just as expected.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.2: 1.5.240404000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response