title: How to draw a Horizontal line between items in Xamarin master menu?
body: <p>How to separate two items by line in Xamarin Forms MenuItems like this pic:</p>
  
  <p><a href="https://i.stack.imgur.com/4nU6u.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/4nU6u.jpg" alt="enter image description here"></a></p>
  
  <p>I mean, in the same menu items, I want to draw a horizontal line between two groups of items (not between every item and the other, which done by <code>SeparatorVisibility="Default"</code>).</p>
  
  <p>Here is cs code:</p>
  
  <pre><code>using System;
  using Xamarin.Forms;
  namespace GMG
  {
      [XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class MasterDetailPage1Master : ContentPage
      {
          public ListView ListView;
          public MasterDetailPage1Master()
          {
              InitializeComponent();
              BindingContext = new MasterDetailPage1MasterViewModel();
              ListView = MenuItemsListView;
          }
          class MasterDetailPage1MasterViewModel : INotifyPropertyChanged
          {
              public ObservableCollection&lt;MasterDetailPage1MenuItem&gt; MenuItems { get; set; }
              public MasterDetailPage1MasterViewModel()
              {
                  MenuItems = new ObservableCollection&lt;MasterDetailPage1MenuItem&gt;(new[]
                  {
                      new MasterDetailPage1MenuItem { Id = 0, Title = "Hospitals", Icon="hosp.png", TargetType= typeof(Hospitals) },
                      new MasterDetailPage1MenuItem { Id = 1, Title = "Clinics", Icon="cli.png",TargetType= typeof(Clinics) },
                      new MasterDetailPage1MenuItem { Id = 2, Title = "Pharmacies", Icon="pha.png", TargetType= typeof(Pharma) },
                      new MasterDetailPage1MenuItem { Id = 3, Title = "Labs", Icon="lab2.png", TargetType= typeof(Labs) },
                      new MasterDetailPage1MenuItem { Id = 4, Title = "MainPage",  Icon="home.png", TargetType= typeof(MasterDetailPage1Detail) },
                      new MasterDetailPage1MenuItem { Id = 5, Title = "Call us",  Icon="cont.png" },
                      new MasterDetailPage1MenuItem { Id = 6, Title = "Rating App",  Icon="rate.png" },
  
                  });
              }
              #region INotifyPropertyChanged Implementation
              public event PropertyChangedEventHandler PropertyChanged;
              void OnPropertyChanged([CallerMemberName] string propertyName = ""){
                  if (PropertyChanged == null)
                      return;
                  PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
  }}}}
  </code></pre>
  
  <p>This is Xaml Code:</p>
  
  <pre><code>&lt;StackLayout&gt;
          &lt;StackLayout&gt;
              &lt;Label Text="GMG"/&gt;
          &lt;/StackLayout&gt;
          &lt;ListView x:Name="MenuItemsListView"
                    RowHeight="55"
                    ItemsSource="{Binding MenuItems}"&gt;
        &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
            &lt;ViewCell&gt;
              &lt;StackLayout&gt;
                &lt;Label Text="{Binding Title}"/&gt;
                  &lt;Image Source="{Binding Icon}"/&gt;
              &lt;/StackLayout&gt;             
            &lt;/ViewCell&gt;         
          &lt;/DataTemplate&gt;
        &lt;/ListView.ItemTemplate&gt;
      &lt;/ListView&gt;      
    &lt;/StackLayout&gt;
  &lt;/ContentPage&gt;
  </code></pre>