title: How to add a line separator between Page.Toolbaritems in Xamarin Forms
body: <p>I'm adding <code>toolbar item</code> to the <code>Page.ToolbarItems</code> list, but I would like to add a line separator between certain <code>toolbar item</code>. I could add a new <code>toolbar item</code> with an image of a line, but I would need to prevent any <code>Action</code> when the line is pressed and it won't allow me to use <code>null</code>. It would also look less than ideal. </p>
  
  <p>Note that that each <code>ToolbarItem</code> is added through the C# code, not through Xaml.</p>
  
  <p>Here is some pseudo code as an example of what I have now:</p>
  
  <pre><code>if(!ToolbarItems.Any())
  {
      ToolbarItems.Add(new ToolbarItem("Page 1", null, NavigateToPage1(), ToolbarItemOrder.Secondary, 0);
      ToolbarItems.Add(new ToolbarItem("Page 2", null, NavigateToPage2(), ToolbarItemOrder.Secondary, 0);
      // &lt;Insert Separator Here&gt;
      if(boolVal) {
          ToolbarItems.Add(new ToolbarItem("Page 3", null, NavigateToPage3(), ToolbarItemOrder.Secondary, 0); 
      }
      ToolbarItems.Add(new ToolbarItem("Page 4", null, NavigateToPage4(), ToolbarItemOrder.Secondary, 0);
      ToolbarItems.Add(new ToolbarItem("Page 5", null, NavigateToPage5(), ToolbarItemOrder.Secondary, 0);
      // &lt;Insert Separator Here&gt;
      ToolbarItems.Add(new ToolbarItem("Page 6", null, NavigateToPage6(), ToolbarItemOrder.Secondary, 0);
  }
  </code></pre>