title: Hamburger Menu Xamarin Forms (MasterDetailPage)
body: <p>I'm new enough to use Xamarin, in my Xamarin Forms project I created a Master-Detail Page and in the ListView that represents the menu I wanted to put Title and Icon, for icon images I have to insert each icon in all device projects?</p>
  
  <p>And I also have a small problem, when I click on a menu item and navigate to the selected Detail page, the hamburger menu disappears</p>
  
  <p>MainPageMaster.xaml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               x:Class="XXX"
               Title="Master"&gt;
    &lt;StackLayout&gt;
      &lt;ListView x:Name="MenuItemsListView"
                SeparatorVisibility="None"
                HasUnevenRows="true"
                ItemsSource="{Binding MenuItems}"&gt;
        &lt;ListView.Header&gt;
          &lt;Grid BackgroundColor="#03A9F4"&gt;
            &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="6"/&gt;
              &lt;ColumnDefinition Width="*"/&gt;
              &lt;ColumnDefinition Width="6"/&gt;
            &lt;/Grid.ColumnDefinitions&gt;
            &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="15"/&gt;
              &lt;RowDefinition Height="30"/&gt;
              &lt;RowDefinition Height="Auto"/&gt;
              &lt;RowDefinition Height="10"/&gt;
            &lt;/Grid.RowDefinitions&gt;
            &lt;Label
                Grid.Column="1"
                Grid.Row="1"
                Text="B1 Term"
                HorizontalTextAlignment="Center"
                Style="{DynamicResource SubtitleStyle}"/&gt;
          &lt;/Grid&gt;
        &lt;/ListView.Header&gt;
        &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
            &lt;ViewCell&gt;
                &lt;StackLayout VerticalOptions="FillAndExpand"
                               Orientation="Horizontal"
                               Padding="20,10,0,10"
                               Spacing="20"&gt;
                              &lt;Image Source="{Binding Icon}"
                           WidthRequest="40"
                           HeightRequest="40"
                           VerticalOptions="Center" /&gt;
                              &lt;Label Text="{Binding Title}"
                           FontSize="Medium"
                           VerticalOptions="Center"
                           TextColor="Black"/&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>
  
  <p>File .cs</p>
  
  <pre><code>[XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class MainPageMaster : ContentPage
      {
          public ListView ListView;
  
          public MainPageMaster()
          {
              InitializeComponent();
  
              BindingContext = new MainPageMasterViewModel();
              ListView = MenuItemsListView;
          }
  
          class MainPageMasterViewModel : INotifyPropertyChanged
          {
              public ObservableCollection&lt;MainPageMenuItem&gt; MenuItems { get; set; }
  
              public MainPageMasterViewModel()
              {
                  MenuItems = new ObservableCollection&lt;MainPageMenuItem&gt;(new[]
                  {
                      new MainPageMenuItem { Id = 0, Icon="ic_menu_home.png",Title = "Home", TargetType = typeof(MainPageDetail) },
                      new MainPageMenuItem { Id = 1, Title = "Elenco Clienti", TargetType = typeof(ElencoClientiPage) },
                      new MainPageMenuItem { Id = 2, Title = "Logout", TargetType = typeof(LogOut) }
                  });
              }
  
              #region INotifyPropertyChanged Implementation
              public event PropertyChangedEventHandler PropertyChanged;
              void OnPropertyChanged([CallerMemberName] string propertyName = "")
              {
                  if (PropertyChanged == null)
                      return;
  
                  PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
              }
              #endregion
          }
      }
  </code></pre>
  
  <p><strong>Screen</strong></p>
  
  <p><a href="https://i.stack.imgur.com/n48Eh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n48Eh.png" alt="enter image description here"></a></p>
  
  <p>In this image, my icon isn't visible but I add an image in Android project</p>