I found strange behavior. If SelectedItem is a SettingsItem parameter, then you cannot undo it from the code.
XAML:
<NavigationView Name="nv">
<NavigationView.MenuItems>
<NavigationViewItem Content="dsadas" />
<NavigationViewItem Content="dsadas" />
<NavigationViewItem Content="dsadas" />
<NavigationViewItem Content="dsadas" />
</NavigationView.MenuItems>
<Button Click="Button_Click" Content="de select" />
</NavigationView>
CS:
private void Button_Click(object sender, RoutedEventArgs e)
{
nv.SelectedItem = null;
}
And it's all. I do not understand why the code does not work for the settings item and how to deal with this problem.
source
share