title: My Xamarin project not displaying values in ListView
body: <p>I'm starting to learn Xamarin. I followed this video course:  <a href="https://www.youtube.com/watch?v=aQtNynTLhl4" rel="nofollow noreferrer">Youtube Link</a>.</p>
  <p>I have an SQLite database populated, that i added (in root) in the code project as embedded resource.
  If I check ItemPage.xaml, there is a black windows and i don't see any listview. (This is a Master-Detail project with .net standard).</p>
  <p>I checked with the debugger, the <em>ExecuteLoadItemsCommand</em> gets the rows from the db, but the listview didn't display it.</p>
  <p>ItemsPage.xaml:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  xmlns:sfgrid="clr-namespace:Syncfusion.SfDataGrid.XForms;assembly=Syncfusion.SfDataGrid.XForms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:local="clr-namespace:SampleBrowser.SfDataGrid;assembly=SampleBrowser.SfDataGrid"
               xmlns:sys="clr-namespace:System;assembly=mscorlib"
               xmlns:local1="clr-namespace:ZilahiReformatusTemeto.Models"
               x:Class="ZilahiReformatusTemeto.Views.ItemsPage"
                Title="{Binding Title}"
               x:Name="BrowseItemsPage"&gt;
      &lt;ContentPage.ToolbarItems&gt;
          &lt;ToolbarItem Text="Add" Clicked="AddItem_Clicked"&gt;
              &lt;ToolbarItem.Icon&gt;
                  &lt;OnPlatform x:TypeArguments="FileImageSource"&gt;
                      &lt;On Platform="UWP" Value="add.png"/&gt;
                  &lt;/OnPlatform&gt;
              &lt;/ToolbarItem.Icon&gt;
          &lt;/ToolbarItem&gt;
      &lt;/ContentPage.ToolbarItems&gt;
      &lt;ContentPage.BindingContext&gt;
          &lt;local1:Sírok x:Name="viewModel" /&gt;
      &lt;/ContentPage.BindingContext&gt;
  
      &lt;StackLayout&gt;
          &lt;ListView 
                  ItemsSource="{Binding Sírok}"
                  VerticalOptions="FillAndExpand"
                  HasUnevenRows="true"
                  RefreshCommand="{Binding LoadItemsCommand}"
                  IsPullToRefreshEnabled="true"
                  IsRefreshing="{Binding IsBusy, Mode=OneWay}"
                  
                  ItemSelected="OnItemSelected"&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell&gt;
                          &lt;StackLayout &gt;
                              &lt;Label Text="{Binding Parcellaszám}" 
                                  LineBreakMode="NoWrap" 
                                  Style="{DynamicResource ListItemTextStyle}" 
                                  FontSize="16" /&gt;
                              &lt;Label Text="{Binding Sírhelyszám}" BindingContext="{Binding Sírhelyszám}"
                                  LineBreakMode="NoWrap"
                                  Style="{DynamicResource ListItemDetailTextStyle}"
                                  FontSize="13" /&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>
  </div>
  </div>
  </p>
  <p>ItemsPage.xaml.cs:</p>
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Xamarin.Forms;
  using Xamarin.Forms.Xaml;
  
  using ZilahiReformatusTemeto.Models;
  using ZilahiReformatusTemeto.Views;
  using ZilahiReformatusTemeto.ViewModels;
  
  namespace ZilahiReformatusTemeto.Views
  {
      [XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class ItemsPage : ContentPage
      {
          ItemsViewModel viewModelg;
  
          public ItemsPage()
          {
              InitializeComponent();
  
              viewModelg = new ItemsViewModel();
              BindingContext = viewModelg;
          }
  
          async void OnItemSelected(object sender, SelectedItemChangedEventArgs args)
          {
              var item = (Sírok)args.SelectedItem;
              if (item == null)
                  return;
  
              await Navigation.PushAsync(new ItemDetailPage(new ItemDetailViewModel(item)));
  
              // Manually deselect item.
              //SfDataGrid.SelectedIndexProperty = -1;
              //ItemsListView.SelectedItem = null;
          }
  
          async void AddItem_Clicked(object sender, EventArgs e)
          {
              await Navigation.PushModalAsync(new NavigationPage(new NewItemPage()));
          }
  
          protected override void OnAppearing()
          {
              base.OnAppearing();
  
              if (viewModelg.Items.Count == 0)
                  viewModelg.LoadItemsCommand.Execute(null);
          }
      }
  }
  </code></pre>
  <p>Edit - Added - ItemsViewModel:</p>
  <pre><code>    using System;
  using System.Collections.ObjectModel;
  using System.Diagnostics;
  using System.Threading.Tasks;
  
  using Xamarin.Forms;
  
  using ZilahiReformatusTemeto.Models;
  using ZilahiReformatusTemeto.Views;
  
  namespace ZilahiReformatusTemeto.ViewModels
  {
      public class ItemsViewModel : BaseViewModel
      {
          public ObservableCollection&lt;Sírok&gt; Items { get; set; }
          public Command LoadItemsCommand { get; set; }
  
          public ItemsViewModel()
          {
              Title = &quot;Browse&quot;;
              Items = new ObservableCollection&lt;Sírok&gt;();
              LoadItemsCommand = new Command(async () =&gt; await ExecuteLoadItemsCommand());
  
              MessagingCenter.Subscribe&lt;NewItemPage, Sírok&gt;(this, &quot;AddItem&quot;, async (obj, item) =&gt;
              {
                  var newItem = item as Sírok;
                  Items.Add(newItem);
                  await DataStore.AddItemAsync(newItem);
              });
          }
  
          async Task ExecuteLoadItemsCommand()
          {
              if (IsBusy)
                  return;
  
              IsBusy = true;
  
              try
              {
                  Items.Clear();
                  var items = await DataStore.GetItemsAsync(true);
                  foreach (Sírok item in items)
                  {
                      Items.Add(item);
                  }
              }
              catch (Exception ex)
              {
                  Debug.WriteLine(ex);
              }
              finally
              {
                  IsBusy = false;
              }
          }
      }
  }
  </code></pre>
  <p>Here is my project that I'm working on : <a href="https://drive.google.com/file/d/1qlH7aF9JkkTCkfPi23M2tT2AlO6mm7x3/view?usp=sharing" rel="nofollow noreferrer">LINK</a></p>