title: Xamarin Listview data not showing up?
body: <p>I decided that I need a custom <code>ListView</code> for all platforms which can show multiple data fields on my <code>ListView</code>. So I decided to check out the code from <a href="https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithListviewNative" rel="nofollow noreferrer">https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithListviewNative</a> and modify it in my module. However my <code>ListView</code> is never showing any values / view and I have no idea why.</p>
  
  <p><strong>HorsePage.xaml:</strong></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="Begijnhoeve.Pages.HorsesPage"
           Title="Horse Overview"&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p><strong>HorsePage.xaml.cs:</strong></p>
  
  <pre><code>var nativeListViewHorse = new NativeListViewHorse(); // CUSTOM RENDERER using a native control
          nativeListViewHorse.VerticalOptions = LayoutOptions.FillAndExpand;
          nativeListViewHorse.Items = DAHorse.DataAccess.DAHorse.GetList();
          Content = new StackLayout
          {
              Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0),
              Children = {
                  new Label {
                      XAlign = TextAlignment.Center,
                      Text = Device.OnPlatform("Custom UITableView+UICell","Custom ListView+Cell","Custom renderer todo")
                  },
                  nativeListViewHorse
              }
          };
  </code></pre>
  
  <p><strong>DAHorse.cs (Data Access layer):</strong></p>
  
  <pre><code>namespace DAHorse.DataAccess
  {
    class DAHorse
    {
      private static object locker = new object();
      private static SQLiteConnection db = DependencyService.Get&lt;ISQLite_PCL&gt;().GetConnection();
      public static List&lt;Horse&gt; GetList()
      {
          var l = new List&lt;Horse&gt;();
  
          l.Add(new Horse("HorseA", "1999"));
          l.Add(new Horse("HorseB", "2000"));
          l.Add(new Horse("HorseC", "2000"));
          Debug.WriteLine("YAPYAPYAPYAP");
          return l;
      }
    }
  }
  </code></pre>
  
  <p><strong>NativeListViewHorse.cs (Custom list view):</strong></p>
  
  <pre><code>public class NativeListViewHorse : View
  {
      public static readonly BindableProperty ItemsProperty =
          BindableProperty.Create("Items", typeof(IEnumerable&lt;Horse&gt;), typeof(NativeListViewHorse), new List&lt;Horse&gt;());
  
      public IEnumerable&lt;Horse&gt; Items
      {
          get { return (IEnumerable&lt;Horse&gt;)GetValue(ItemsProperty); }
          set { SetValue(ItemsProperty, value); }
      }
  
      public event EventHandler&lt;SelectedItemChangedEventArgs&gt; ItemSelected;
  
      public void NotifyItemSelected(object item)
      {
  
          if (ItemSelected != null)
              ItemSelected(this, new SelectedItemChangedEventArgs(item));
      }
  
      public NativeListViewHorse()
      {
      }
  }
  </code></pre>
  
  <p>When I debug the line where the <code>Content</code> is filled I will get the following data:
  <img src="https://i.imgur.com/jhiSr0m.png" />
  Why isn't anything showing up while the data is seen in the variable? Have I done something wrong or?</p>
  
  <p>With kind regards,
  Yenthe</p>