unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
170 stars 33 forks source link

Material theme doesn't show InfoBadge on NavigationViewItem #1395

Open gevart opened 7 months ago

gevart commented 7 months ago

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.

Anything else we need to know?

kazo0 commented 7 months ago

Thanks for the issue @gevart

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