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.
I am trying to add a NavigationViewItem dynamically into the NavigationView. Its correctly showing the newly added item into the left navigation pane. but navigation service is not able to navigate by the TargetPageTag.
To Reproduce
var nav = _navigationService.GetNavigationControl();
var selected = nav.SelectedItem;
selected.MenuItems.Clear();
var mn = new NavigationViewItem()
{
Content = project.ProjectName,
Icon = new SymbolIcon { Symbol = SymbolRegular.TableLightning24 },
TargetPageType = typeof(ProjectPage),
TargetPageTag = "ProjectPage"
};
selected.MenuItems.Add(mn);
_navigationService.Navigate("ProjectPage");
Expected behavior
Navigation service should navigate to the newly added NavigationViewItem with the TargetPageTag
Describe the bug
I am trying to add a NavigationViewItem dynamically into the NavigationView. Its correctly showing the newly added item into the left navigation pane. but navigation service is not able to navigate by the TargetPageTag.
To Reproduce
Expected behavior
Navigation service should navigate to the newly added NavigationViewItem with the TargetPageTag
Screenshots
No response
OS version
Windows 11
.NET version
.net 8.0
WPF-UI NuGet version
3.0.4
Additional context
No response