title: Maui ListView binding to items of a list
body: <p>I am having some issues binding labels in a <code>ListView</code> to properties of items in a list in my ViewModel.</p>
  <p>The ItemsSource of the ListView binds to the list just fine, but I can not access the properites of items in that list. Can anyone see what I am missing?</p>
  <p>Compiler Message:</p>
  <pre><code>XFC0045 Binding: Property &quot;Name&quot; not found on &quot;SocketApp.Pages.ConnectionPageViewModel&quot;.    
  </code></pre>
  <p>XAML:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;ContentPage xmlns=&quot;http://schemas.microsoft.com/dotnet/2021/maui&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
               x:Class=&quot;SocketApp.Pages.ConnectionsPage&quot;
               xmlns:local=&quot;clr-namespace:SocketApp.Pages&quot;
               x:DataType=&quot;local:ConnectionPageViewModel&quot;&gt; &lt;!-- ViewModel Set --&gt;
      &lt;StackLayout &gt;
          &lt;!-- Binding the List to the ListView --&gt;
          &lt;!-- This works fine --&gt;
          &lt;ListView ItemsSource=&quot;{Binding ListItems}&quot; HasUnevenRows=&quot;True&quot; VerticalOptions=&quot;FillAndExpand&quot; HorizontalOptions=&quot;FillAndExpand&quot; &gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell &gt;
                          &lt;Grid Padding=&quot;5&quot;  HeightRequest=&quot;50&quot;&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width=&quot;*&quot; /&gt;
                                  &lt;ColumnDefinition Width=&quot;9*&quot; /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;StackLayout Orientation=&quot;Vertical&quot; Grid.Column=&quot;1&quot; Margin=&quot;5&quot; &gt;
                                  &lt;!-- Try to Bind to a property of an item within the list  --&gt;
                                  &lt;!-- This is what is not working  --&gt;
                                  &lt;Label Grid.Column=&quot;1&quot; Text=&quot;{Binding Name}&quot; FontAttributes=&quot;Bold&quot; /&gt;
                                  &lt;Label Grid.Row=&quot;1&quot; Grid.Column=&quot;1&quot; Text=&quot;{Binding Address}&quot; FontAttributes=&quot;Italic&quot; VerticalOptions=&quot;End&quot; /&gt;
                              &lt;/StackLayout&gt;
                          &lt;/Grid&gt;
                      &lt;/ViewCell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
      &lt;/StackLayout&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  <p>ViewModel:</p>
  <pre><code>public class ConnectionPageViewModel : INotifyPropertyChanged
  {
      private List&lt;ConnectionListItem&gt; _listItems = new List&lt;ConnectionListItem&gt;();
      public List&lt;ConnectionListItem&gt; ListItems
      {
          get =&gt; _listItems;
          set
          {
              _listItems = value;
              OnPropertyChanged(nameof(ListItems));
          }
      }
      protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
      {
          PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  }
  </code></pre>