title: Xamarin Forms - how to display/Bind List in ListView?
body: <p>I'm creating a cart where i store all of my orders , How to display List in ListView?</p>
  
  <p>i tried doing these codes</p>
  
  <p><strong>CustomerOrder.cs</strong></p>
  
  <pre><code>public class CustomerOrder
      {
          public string menuname { get; set; }
          public string price { get; set; }
          public string qty { get; set; }
          public string mcode { get; set; }
      }
  
      public class CustList
      {
          //i want to display/bind this in Listview
          public List&lt;CustomerOrder&gt; CUSTOMER_ORDER { get; set; }
      }
  </code></pre>
  
  <p><strong>OrderCart.xaml</strong></p>
  
  <pre><code>&lt;ListView x:Name="MyCart" ItemSelected="MyCart_ItemSelected"  ItemsSource="{Binding CUSTOMER_ORDER}" RowHeight="50"&gt;
          &lt;ListView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ViewCell &gt;
                      &lt;Grid&gt;
  
                                  &lt;StackLayout Orientation="Horizontal"&gt;
                                      &lt;Label  Text="{Binding menuname}" Font="30" TextColor="Black" FontAttributes="Bold"/&gt;
                                      &lt;Label  Text="{Binding qty}" Font="30" TextColor="Black" FontAttributes="Bold"/&gt;
                                      &lt;Label  Text="{Binding price}" Font="30" TextColor="Black" FontAttributes="Bold"/&gt;
                                      &lt;Label  Text="{Binding mcode}" Font="30" TextColor="Black" FontAttributes="Bold"/&gt;
                                  &lt;/StackLayout&gt;
                    &lt;/Grid&gt;
                  &lt;/ViewCell&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
  
      &lt;/ListView&gt;
  </code></pre>