Open Muxammadamin-Ulmasaliyev opened 3 months ago
You need to set the TargetPageType
property of NavigationViewItem
to properly trigger the SelectionChanged
event
You need to set the
TargetPageType
property ofNavigationViewItem
to properly trigger theSelectionChanged
event
Anyway, this is unreasonable. Why does TargetPageType=null affect the SelectionChanged event of NavigationViewItem?
Describe the bug
The SelectionChanged event in the NavigationView control does not fire when a new item is selected.
To Reproduce
Expected behavior
The SelectionChanged event should fire each time a different item is selected, allowing appropriate handling of the selection change.
Screenshots
No response
OS version
Windows 11 pro 23H2
.NET version
.NET 8
WPF-UI NuGet version
WPF-UI 3.0.5
Additional context
private void sidebarNavigationView_SelectionChanged(NavigationView sender, RoutedEventArgs args) { System.Windows.MessageBox.Show("Selection changed ! "); }