Uno.Themes icon indicating copy to clipboard operation
Uno.Themes copied to clipboard

Material theme doesn't show InfoBadge on NavigationViewItem

Open gevart opened this issue 10 months ago • 1 comments

Current behavior

  1. MS WinUI 3 App with NavigationViewItem with InfoBadge shows the badge as expected (theme is Fluent of course).
  2. Uno WinUI Material head with NavigationViewItem with InfoBadge doesn't show the badge.
  3. Uno WinUI Material head with Button with InfoBadge (code from Uno Gallery) shows the badge as expected.

So it looks like the problem might lie specifically within Material implementation of NavigationViewItem's InfoBadge.

Expected behavior

Uno WinUI Material head with NavigationViewItem with InfoBadge should show the badge.

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

This code shows the badge on MS WinUI and doesn't show it on Uno Material WinUI:

<NavigationViewItem Icon="Mail" Content="Inbox">
    <NavigationViewItem.InfoBadge>
        <InfoBadge Value="5"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            Margin="5" />
    </NavigationViewItem.InfoBadge>
</NavigationViewItem>

Environment

InfoBadge within NavigationViewItem is supported starting from WindowsAppSDK 1.2, the issue reproduces on the latest WindowsAppSDK 1.5.

Nuget Package:

Package Version(s):

Affected platform(s):

I tested it on WinUI and WPF heads, other heads are probably affected too.

  • [ ] iOS
  • [ ] Android
  • [ ] WebAssembly
  • [ ] UWP
  • [ ] MacOS

Anything else we need to know?

gevart avatar Apr 19 '24 04:04 gevart

Thanks for the issue @gevart

We will investigate and prioritize this along with general InfoBadge support in Material going forward!

kazo0 avatar Apr 19 '24 14:04 kazo0