title: adding a list to itemsource, WPF
body: <p>I am starting with WPF and I have this problem. I have a file called MainWindow.xaml with this code:</p>
  <pre><code>
  &lt;Window x:Class=&quot;View.MainWindow&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
          xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
          xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
          xmlns:local=&quot;clr-namespace:View&quot; xmlns:system=&quot;clr-namespace:System;assembly=System.Runtime&quot;
          mc:Ignorable=&quot;d&quot;
          Title=&quot;MainWindow&quot; Height=&quot;450&quot; Width=&quot;800&quot;&gt;
      &lt;Grid &gt;
          &lt;ItemsControl ItemsSource=&quot;{Binding}&quot; x:Name=&quot;boardView&quot;&gt;
          &lt;/ItemsControl&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  
  </code></pre>
  <p>And I have another file called MainWindow.xaml.cs with this code</p>
  <pre><code>namespace ViewModel
  {
      /// &lt;summary&gt;
      /// Interaction logic for MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
              var items = new List&lt;string&gt; { &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot; };
             
          }
      }
  }
  
  </code></pre>
  <p>Now I have to assign this list to boardView.ItemsSource. How can I do that?</p>