lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.47k stars 725 forks source link

Why does NavigationView not support menu groups without head page #1073

Open iray1024 opened 5 months ago

iray1024 commented 5 months ago

Describe the bug

When adding a Menu that includes sub level menus, a page must also be provided for the Top level menu. Otherwise, the top level menu's name will not be displayed.

To Reproduce

var topLevelMenu = new NavigationMenuItem() { Name = "Top" };

topLevelMenu .MenuItems.Add(new ...);

Expected behavior

Can add a top-level menu item that is only used to expand submenus, not for navigation.

Screenshots

No response

OS version

Win11

.NET version

.NET 8.0

WPF-UI NuGet version

3.0.4

Additional context

No response

iray1024 commented 5 months ago

Is it setting Content? I feel like this is a strange logic