microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

NavigationView regression on WinUI 2.8

Open acouvert-msft opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug

A NavigationViewItem with its MenuItems filled with one or more NavigationViewItem, failed to draw the content of MenuItems when using WinUI 2.8.

This is a regression, as such scenario was working perfectly fine with prior version of WinUI.

Steps to reproduce the bug

Create a UWP project with WinUI 2.8 with the following:

.xaml:

<muxc:NavigationView Loaded="NavView_Loaded">
  <muxc:NavigationView.MenuItems>
    <muxc:NavigationViewItem x:Name="items" Content="Items" IsExpanded="True" />
  </muxc:NavigationView.MenuItems>
</muxc:NavigationView>

.xaml.cs:

private Mux.NavigationViewItem CreateMenuItem(string title)
  => new Mux.NavigationViewItem
  {
    Content = title,
  };

private void NavView_Loaded(object sender, RoutedEventArgs e)
  => items.MenuItems.Add(CreateMenuItem("Item 0"));

Expected behavior

The NavigationViewItem which is part of a NavigationViewItem.MenuItems is expected to be drawn as it was the case with previous WinUI version.

Screenshots

WinUI 2.8: image image Note that Item 0 is not visible whereas MenuItems contains the expected elements.

WinUI 2.7.2: image Note that Item 0 is visible as expected.

NuGet package version

Microsoft.UI.Xaml 2.8.0

Windows app type

  • [ ] UWP
  • [ ] Win32

Device form factor

Desktop

Windows version

Windows 11 (21H2): Build 22000

Additional context

No response

acouvert-msft avatar Jul 26 '22 12:07 acouvert-msft

@ranjeshj FYI

krschau avatar Jul 27 '22 14:07 krschau

Another note on this bug, after adding subitem to the NavigationViewItem, the app crash if the panel is manually or automatically compacted. image

HO-COOH avatar Aug 03 '22 09:08 HO-COOH