Skip to content

fix: Rename DrawerControl resource keys that shadow WinUI NavigationView theme resources#1553

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-toolkit-styles-navigation-view
Draft

fix: Rename DrawerControl resource keys that shadow WinUI NavigationView theme resources#1553
Copilot wants to merge 2 commits intomainfrom
copilot/fix-toolkit-styles-navigation-view

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

DrawerControl.Enhanced.xaml declared PaneToggleButtonHeight and NavigationViewPaneHeaderRowMinHeight as global resources. These are the same keys WinUI's NavigationView uses internally — merging ToolkitResources into an app silently overrides them app-wide, not just within DrawerNavigationViewStyle.

The critical offender is NavigationViewPaneHeaderRowMinHeight = 4, which overrides WinUI's default of 40, collapsing the pane header row and clipping the hamburger button:

Without ToolkitResources With ToolkitResources (before fix)
correct clipped

Changes

  • DrawerControl.Enhanced.xaml: Renamed the two conflicting resource keys to toolkit-scoped names:
    • PaneToggleButtonHeightDrawerPaneToggleButtonHeight
    • NavigationViewPaneHeaderRowMinHeightDrawerNavigationViewPaneHeaderRowMinHeight
  • Updated all 3 internal {StaticResource} references to match the new keys

PR Type

  • Bugfix

What is the current behavior?

Adding <ToolkitResources /> to an app overrides WinUI's internal NavigationViewPaneHeaderRowMinHeight resource (setting it from 40 to 4), causing the NavigationView hamburger button to be clipped at the bottom on all platforms.

What is the new behavior?

The resource keys used internally by DrawerControl are prefixed with Drawer to avoid shadowing WinUI theme resources. Standard NavigationView controls are unaffected by including ToolkitResources.

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
    • Triggering command: /usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0 (dns block)
  • 1s1vsblobprodcus386.blob.core.windows.net
    • Triggering command: /usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0 (dns block)
  • 4zjvsblobprodcus390.blob.core.windows.net
    • Triggering command: /usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0 (dns block)
  • ckzvsblobprodcus347.blob.core.windows.net
    • Triggering command: /usr/bin/dotnet dotnet build src/Uno.Toolkit.UI/Uno.Toolkit.WinUI.csproj -p:TargetFrameworkOverride=net9.0 (dns block)
  • u6ovsblobprodcus377.blob.core.windows.net
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>Toolkit styles break WinUI Navigation view styling</issue_title>
<issue_description><!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!

If the matter is security related, please disclose it privately via https://github.com/nventive/Uno/security/
-->

Current behavior

When toolkit styles are not included, hamburger button of NavigationView looks correctly:

Image

When I add <ToolkitResources xmlns="using:Uno.Toolkit.UI" />, it becomes clipped at the bottom:

Image

Expected behavior

How to reproduce it (as minimally and precisely as possible)

Nuget Package:

Package Version(s):

Affected platform(s):

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Skia
    • WPF
    • GTK (Linux)
    • Linux Framebuffer
    • Tizen
  • Windows

IDE:

  • Visual Studio 2022
  • Visual Studio 2019
  • Visual Studio Code
  • Visual Studio for Mac
  • Rider Windows
  • Rider macOS

Relevant plugins:

Anything else we need to know?

</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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 AI requested a review from MartinZikmund March 16, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolkit styles break WinUI Navigation view styling

4 participants