Question: Why MenuItems does not found on NavigationViewItem
See original GitHub issue(I am using Visual Studio Chinese translated, the sentence below is translated which may be difference than Oringinal.)
When I typed these code, editor tells me Unexpected symbol "MenuItems"
<NavigationViewItem Content="Nav Item">
<NavigationViewItem.MenuItems>
</NavigationViewItem.MenuItems>
</NavigationViewItem>
Why and what happens? I even changed my IDE from VS to JB, it’s still not working And also, this is not working
<Page ... xmlns:muxc="using:Windows.UI.Xaml.Controls" ... >
...
<Grid>
<muxc:NavigationViewItem Content="Nav Item">
<muxc:NavigationViewItem.MenuItems>
</muxc:NavigationViewItem.MenuItems>
</muxc:NavigationViewItem>
</Grid>
</Page>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
UWP: NavigationView.MenuItems results empty if ...
The parameter of Collapse method is NavigationViewItem , and we could not pass MenuItems element (data source type) into it directly. We need ......
Read more >NavigationView.MenuItems and navigation - Microsoft Q&A
The issue is related to the linq that you used to get the NavigationViewItem . Actually, you could directly get the invoked item...
Read more >NavigationViewItem Class (Windows.UI.Xaml.Controls)
Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)....
Read more >Navigating in a WinUI 3 Desktop application
We will cover navigating from a menu item to an application page, navigating to a menu item from code behind, retrieving the current...
Read more >WinUI NavigationView hierarchical generated MenuItems ...
Hi, beginner/hobbyist here,. I have a NavigationView to manage navigation inside the app, and I managed to bind some hierarchical data (just ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You will need to add a reference to the Microsoft.UI.Xaml NuGet package and follow the installation steps outlined in the packages readme.
So the awnser is effectively that you haven’t install and aren’t actually using WinUI. Or, you are using system UWP which can be also called WinUI 1.