title: How do I bind a List<CustomObject> to a WPF DataGrid?
body: <p>I'm new to WPF and want to do some basic databinding.
  I have a List of a CustomObject and want to bind it to a DataGrid.</p>
  
  <p>MainWindow.xaml.cs</p>
  
  <pre><code>   using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Windows;
      using System.Windows.Controls;
      using System.Windows.Data;
      using System.Windows.Documents;
      using System.Windows.Input;
      using System.Windows.Media;
      using System.Windows.Media.Imaging;
      using System.Windows.Navigation;
      using System.Windows.Shapes;
  
      namespace WpfApplication1
      {
          /// &lt;summary&gt;
          /// Interaction logic for MainWindow.xaml
          /// &lt;/summary&gt;
          public partial class MainWindow : Window
          {
              public MainWindow()
              {
                  InitializeComponent();
                  List&lt;ArticleItem&gt; list = new List&lt;ArticleItem&gt;() 
                  {
                  new ArticleItem(){ ID=3, Title="test", ViewCount=5},
                  new ArticleItem(){ ID=3, Title="test", ViewCount=5},
                  new ArticleItem(){ ID=3, Title="test", ViewCount=5},
                  new ArticleItem(){ ID=3, Title="test", ViewCount=5},
                  };
              }
          }
  
          public class ArticleItem 
          {
              public int ID { get; set; }
              public int ViewCount { get; set; }
              public String Title { get; set; }
          }
      }
  </code></pre>
  
  <p>This is how my grid looks like:</p>
  
  <pre><code>&lt;DataGrid Height="179" HorizontalAlignment="Left" Margin="54,65,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="382"&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn Header="ID"/&gt;
              &lt;DataGridTextColumn Header="ViewCount" /&gt;
          &lt;DataGridTextColumn Header="Title" /&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>I'm used to the databinding from ASP.Net, where I can easily say:</p>
  
  <pre><code>this.dataGrid1.DataSource = list;
  </code></pre>
  
  <p>How must I proceed in WPF?</p>