title: Xamarin.form - Masterdetailpage : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation
body: <p>I have using xamarin.form portable</p>
  
  <p>When I using MasterDetailPage I am getting error: "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation."</p>
  
  <p>Below is my xaml code </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           x:Class="SlideNavigation.Page1"
                IsPresented="True"&gt;
    &lt;MasterDetailPage.Master&gt;
  &lt;ContentPage&gt;
    &lt;ListView x:Name="listview" ItemSelected="Listview_itemSelected"&gt;
      &lt;ListView.ItemTemplate&gt;
        &lt;DataTemplate&gt;
          &lt;TextCell Text="{Binding Name}" Detail="{Binding Status}"&gt;&lt;/TextCell&gt;
        &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;
    &lt;/ListView&gt;
  &lt;/ContentPage&gt;
  &lt;/MasterDetailPage.Master&gt;
  &lt;MasterDetailPage.Detail&gt;
  &lt;ContentPage &gt;&lt;/ContentPage&gt;
  &lt;/MasterDetailPage.Detail&gt;
  &lt;/MasterDetailPage&gt;
  </code></pre>
  
  <p>Below is my .cs code</p>
  
  <pre><code>public partial class Page1 : MasterDetailPage
  {
      public Page1()
      {
          InitializeComponent();
  
          listview.ItemsSource = new List&lt;Contact&gt;
         {
             new Contact { Name = "Kirti",Status = "True"},
             new Contact { Name = "Nilesh",Status = "False"}
         };
      }
      void Listview_itemSelected(object sender, SelectedItemChangedEventArgs e)
      {
  
          var contact = e.SelectedItem as Contact;
           Detail = new NavigationPage(new  Page2(contact.Name));
          IsPresented = false;
      }
  }
  </code></pre>
  
  <p>Please help me what I am making mistake.</p>
  
  <p>Thanks in advance</p>