title: Dynamic flyout menu using Xamarin.Forms Shell
body: <p>Using Xamarin.Forms new Shell functionality we can now create our app's flyout menu and tabs using a simple AppShell.xaml class. This is great for apps using a static menu. However, most of our company's apps are using a dynamic menu, where particular menu items are visible/invisible/disabled based on certain parameters. This got me thinking about how to set up such a menu. Also, how would we be able to create a submenu underneath a main menu item?</p>
  
  <ol>
  <li>A dynamic menu: Obviously, we can create a dynamic menu using code behind. But we would need to rebuild the menu when there are changes in the menu. There doesn't seem to be a Visible property for a Tab or ShellItem element. My own idea was to create a class responsible for building the menu, and to create extended classes for the menu items with extra properties, like IsVisible.</li>
  <li>Sub menu items: As far as I can see the only way to create a submenu is to dynamically insert menu items, and style them visually so they look like submenu items. Again we would need to rebuild the menu each time we want to 'collapse/expand' a section.</li>
  </ol>
  
  <p>We would like to use Shell for our future apps so I would like to have a solid framework for menu related stuff.</p>
  
  <p>Has anyone found solutions for using dynamic menu's? How would you solve this?</p>
  
  <p>Edit: The IsVisible property should be added to version 4.4 of Xamarin.Forms. This will make dynamic menu's much easier to set up. Still wondering, though how people set up sub menu's.</p>