title: How to bind a list of Tab.Items of type<ShellContent> dynamically AND within XAML with xamarin.forms-shell
body: <p>How to add items of type ShellContent dynamically with data binding considering the MVVM pattern. I want to bind a last of TabViewModels to the Tab.Items collection. NOT codebehind which I can not test.</p>
  
  <p>Instead of the 6 ShellContent objects I want to bind any number during runtime.</p>
  
  <p><strong>MainPage.xaml</strong></p>
  
  <pre><code>&lt;FlyoutItem Route="animals"
                  Title="Animals"
                  FlyoutDisplayOptions="AsSingleItem"&gt;
          &lt;Tab Title="Domestic"
               Route="domestic"
               Icon="paw.png"&gt;
  
              &lt;Tab.Items&gt;
  
                  &lt;ShellContent Route="cats"
                            Style="{StaticResource DomesticShell}"
                            Title="sisi"
                            Icon="cat.png"
                            ContentTemplate="{DataTemplate views:CatsPage}" /&gt;
                  &lt;ShellContent Route="dogs"
                            Style="{StaticResource DomesticShell}"
                            Title="Dogs"
                            Icon="dog.png"
                            ContentTemplate="{DataTemplate views:DogsPage}" /&gt;
                  &lt;ShellContent Route="dogs"
                            Style="{StaticResource DomesticShell}"
                            Title="Dogs"
                            Icon="dog.png"
                            ContentTemplate="{DataTemplate views:DogsPage}" /&gt;
                  &lt;ShellContent Route="dogs"
                            Style="{StaticResource DomesticShell}"
                            Title="Dogs"
                            Icon="dog.png"
                            ContentTemplate="{DataTemplate views:DogsPage}" /&gt;
                  &lt;ShellContent Route="dogs"
                            Style="{StaticResource DomesticShell}"
                            Title="Dogs"
                            Icon="dog.png"
                            ContentTemplate="{DataTemplate views:DogsPage}" /&gt;
                  &lt;ShellContent Route="dogs"
                            Style="{StaticResource DomesticShell}"
                            Title="Dogs"
                            Icon="dog.png"
                            ContentTemplate="{DataTemplate views:DogsPage}" /&gt;
              &lt;/Tab.Items&gt;
  
  
          &lt;/Tab&gt;
  &lt;/FlyoutItem&gt;
  </code></pre>