fix: Rename DrawerControl resource keys that shadow WinUI NavigationView theme resources#1553
Draft
fix: Rename DrawerControl resource keys that shadow WinUI NavigationView theme resources#1553
Conversation
Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
|
|
Copilot
AI
changed the title
[WIP] Fix toolkit styles breaking WinUI Navigation view styling
fix: Rename DrawerControl resource keys that shadow WinUI NavigationView theme resources
Mar 16, 2026
Copilot stopped work on behalf of
MartinZikmund due to an error
March 16, 2026 15:18
Xiaoy312
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DrawerControl.Enhanced.xamldeclaredPaneToggleButtonHeightandNavigationViewPaneHeaderRowMinHeightas global resources. These are the same keys WinUI'sNavigationViewuses internally — mergingToolkitResourcesinto an app silently overrides them app-wide, not just withinDrawerNavigationViewStyle.The critical offender is
NavigationViewPaneHeaderRowMinHeight = 4, which overrides WinUI's default of40, collapsing the pane header row and clipping the hamburger button:Changes
DrawerControl.Enhanced.xaml: Renamed the two conflicting resource keys to toolkit-scoped names:PaneToggleButtonHeight→DrawerPaneToggleButtonHeightNavigationViewPaneHeaderRowMinHeight→DrawerNavigationViewPaneHeaderRowMinHeight{StaticResource}references to match the new keysPR Type
What is the current behavior?
Adding
<ToolkitResources />to an app overrides WinUI's internalNavigationViewPaneHeaderRowMinHeightresource (setting it from40to4), causing theNavigationViewhamburger button to be clipped at the bottom on all platforms.What is the new behavior?
The resource keys used internally by
DrawerControlare prefixed withDrawerto avoid shadowing WinUI theme resources. StandardNavigationViewcontrols are unaffected by includingToolkitResources.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1oavsblobprodcus350.blob.core.windows.net/usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0(dns block)1s1vsblobprodcus386.blob.core.windows.net/usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0(dns block)4zjvsblobprodcus390.blob.core.windows.net/usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0(dns block)ckzvsblobprodcus347.blob.core.windows.net/usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0(dns block)u6ovsblobprodcus377.blob.core.windows.net/usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.