I need to change the NavigationView
menu depending on the page I navigate to.
<ux:NavigationView x:Name="NavView" MenuItemsSource="{x:Bind MainMenu, Mode=OneWay}">
MainMenu
is a dependency property of type List<ux.NavigationViewItemBase>
. Everything is still fine when I fill it in my constructor:
MainMenu = GetMenuItems().ToList();
But when I try to change it later:
ContentFrame.Navigate(item.PageType, null, transitionInfo);
MainMenu = GetMenuItems().ToList();
my app crashes with 0xC0000005: Access violation reading location 0x00000000. in NavigationView.cpp
at line 924.
Is it completely forbidden to change the menu items later or did I hit another problem somehow?
User contributions licensed under CC BY-SA 3.0