microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
"transparency effects" option (on-by-default) breaks flyout backgrounds in self-contained apps running from MSIX if they're in a subdirectory
Describe the bug
Flyout backgrounds (e.g. command bar menus, app bar command flyouts) are fully transparent if this windows option is enabled.
If I extract the MSIX and run the exe directly, they are rendered correctly
Uninstalling all windows app runtime packages does not solve the problem
Steps to reproduce the bug
- Install https://github.com/OpenKneeboard/OpenKneeboard/releases/tag/v1.1-beta3 (self contained, windows app sdk 1.1)
- run app
- click '...' in title bar or settings -> tabs -> add tab
- see flyout with broken background rendering
- close application
- unpack msix with
makeappx
- run
OpenKneeboardApp.exe
directly - repeat step 3
- see proper rendering
- turn off 'transparency effects' in windows 10
- re-run installed app
- repeat step 3
- see proper rendering
Expected behavior
flyouts should be rendered with an opaque or semi-opaque background, not full transparency
Screenshots
Buggy
Good
Windows 10 setting
NuGet package version
WinUI 3 - Windows App SDK 1.1.1
Windows app type
- [ ] UWP
- [X] Win32
Device form factor
Desktop
Windows version
Windows 10 (21H2): Build 19044
Additional context
Can reliably reproduce on my main machine, with an nvidia 3090ti. Can not reproduce in a clean windows 10 installation in hyperv on the same machine, or on a surface pro 3, also running windows 10.
Yeah, this is the switch to self-contained deployment:
https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/2471122272 works fine https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/2471247977 does not
https://github.com/OpenKneeboard/OpenKneeboard/commit/82edd61595d87a3503a6f08ea80bb1bee4f97b52 is the only difference, switching to self-contained
This also only reproduces if actually installed from msix - add-appxpackage -register appxmanifest.xml
doesn't reproduce the problem
also reproduces on a friend's machine with no developer tools, no previous installations of window app runtime/winui3 etc, on windows 11 21H2 22000.739 - also with nvidia graphics card
Still repros with v1.1.4 - https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/3015667140
Does Microsoft.UI.Xaml\Assets\NoiseAsset_256x256_PNG.png
exist in the problematic installs? I think the fully-transparent effect you're seeing could happen if this file can't be found and loaded for the AcrylicBrush effect.
yep, this is present, though with a bin\
prefix next to my executable, not in MSIX_ROOT\Microsoft.UI.Xaml
In case it's useful https://github.com/OpenKneeboard/OpenKneeboard/suites/8196217381/artifacts/356836033 is the extracted MSIX , and https://github.com/OpenKneeboard/OpenKneeboard/suites/8196217381/artifacts/356836034 is the MSIX itself
@codendone thanks for the pointer :)
I changed my app to put the binaries in $MSIX_ROOT
instead of $MSIX_ROOT/bin
- and, in turn, msbuild or the windows app sdk automatically made $MSIX_ROOT/Microsoft.UI.Xaml/
instead of $MSIX_ROOT/bin/Microsoft.UI.Xaml
, and it all works there.
Leaving this open as this should probably work either way, and the add-appxpackage -register
behavior should match the real MSIX behavior
Thanks for the update, @fredemmott. I'm glad you found a solution!