Expandable menu category #1245
Replies: 2 comments
-
Are you referring to the NavigationView? You can have multiple tiers (2 tiers I think) with the NavigationView, but for some reason I cannot get databinding to work on the second tier. |
Beta Was this translation helpful? Give feedback.
-
Ok I found the solution for my problem. I was indeed talking about the NavigationView. To found the solution, I simply looked inside the WPF UI Gallery source code to find how it was implemented. The good news is that it is possible. The bad one is that If you want more than one page in your expandable category, you can't do it with xaml. If you just want one page in your expandable category, just use xaml and put in you NavigationViewItem MenuItemsSource a New NavigationViewItem. If you want several pages in it, you will need to create an ObservableCollection that contains ALL you NavigationViewItem of your entire Menu and then assign this collection to the MenuItemsSource parameter of your NavigationView. The reason you must do that is because if you declare some of your NavigationViewItem s in xaml and others in C#, your App will crash if you try to close your menu or use the Go back button while you are on a page initialized in C#. So the solution is to declare them all in the .cs file and to assign it to the ItemsSource of your entire NavView. |
Beta Was this translation helpful? Give feedback.
-
Hi, I saw that the WPF UI Gallery app had expandable menu categories and I wondered I it was just created for the gallery or of it is really possible to create some expandable menu categories with WPF UI cause if it is, i didn't managed to do it. Thanks in advance for your help
Beta Was this translation helpful? Give feedback.
All reactions