Dynamic list of hamburger menu buttons

Viewed 1623

I want to create a HamburgerMenu from a dynamic list of items, preferably I'd like to bind something like a ListBox with a template to a list on my view model, and have the menu items appear dynamically. (See: http://bit.ly/1Lac78E).

Attempting to add anything to the PrimaryButtons (or probably the SecondaryButtons) collection other than HamburgerButtonInfo causes an error. Presumably because those collections are declared as:

PrimaryButtons = new ObservableItemCollection<HamburgerButtonInfo>(); 
SecondaryButtons = new ObservableItemCollection<HamburgerButtonInfo>(); 

So is it possible to do this with the Template10 hamburger menu, without using code-behind like in this question: UWP Template 10 create a dynamic hamburgermenu?

UPDATE

To clarify, I am trying to create a navigation menu (using the Hamburger menu template) similar to the Mail and Calendar app, where there is a dynamic list of folders and items in the folders.

enter image description here

1 Answers
Related