Description
Describe the bug
I am trying to add few Items based on configuration after the user logs in but the issue is I can see that the item is been added to the navigation menu but for some reason its not shown in the layout.
I can tell that the property is being changed but its not updating in the UI.
It works fine if I add the NavigationViewItem
at constructor but not when i use a Command
or for starters using the default events like for example NavigationView_PaneOpened
private void NavigationView_PaneOpened(NavigationView sender, RoutedEventArgs args)
{
if (_isPaneOpenedOrClosedFromCode)
return;
NavigationView.MenuItems.Clear();
NavigationView.MenuItems.Add(new NavigationViewItem("SamplePage", SymbolRegular.Home24, typeof(SamplePage)));
_isUserClosedPane = false;
}
To Reproduce
Try adding a NavigationViewItem after page load like in event or Relay Command ,etc
I can see that the item is added in navigation item
after clearing the list and adding new items:
but its not appearing in the main window navigation
Expected behavior
The NavigationViewItem Should be added in Navigation menu items list
Screenshots
No response
OS version
Windows 10
.NET version
.net 7
WPF-UI NuGet version
using the git development branch's dll with commit 438edf8
Additional context
No response