Replies: 1 comment
-
|
For C#, In MainNavigationLoaded this selects the 0th item from the list so something is selected: However, the MenuItems need to be defined prior to that code otherwise I would assume it is setting the SelectedItem to null. Pretty much pledgurized that from the Windowing gallery sample. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I write an simple demo of NavigationView, the XAML is:
The
MenuItemsSourceis aWindows::Foundation::Collections::IObservableVectorimplemented bywinrt::single_threaded_observable_vector. I add items in the construtor:Now I want to let the first
NavigationViewItembe selected once the window opened, so I wirte a function bound toLoadedevent:I also tried:
But both methods not work. How to solve this problem? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions