title: Bind List<object> to Datagrid WPF, C#
body: <p>I'm totally new to WPF so heres my code:</p>
  
  <pre><code> &lt;DataGrid x:Name="dgVarConfig" ItemsSource="{Binding varConfigList, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Margin="10,59,0,0" VerticalAlignment="Top" Height="403" Width="1278" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HeadersVisibility="Column"&gt;
  
              &lt;DataGrid.Columns&gt;
                  &lt;DataGridTextColumn  Width="auto" Header="Match Ausdruck" Binding="{Binding match_expression}"&gt;&lt;/DataGridTextColumn&gt;
              &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>My Files: MainWindow.xaml, MainController.cs, VarConfigDAO.cs</p>
  
  <p>the varConfigDAO.cs returns the list to the MainController, and the MainController.cs returns it do MainWindows.xaml.</p>
  
  <p>This is the VarConfig.cs: </p>
  
  <pre><code> public class VarConfig
      {
          public int id { get; set; }
          public String group { get; set; }
          public String machine { get; set; }
          public String match_expression { get; set; }
          public String variant_new_1 { get; set; }
          public String calc_formula_1 { get; set; }
          public String variant_new_2 { get; set; }
          public String calc_formula_2 { get; set; }
      }
  </code></pre>
  
  <p>It works if i set the itemssource programmaticly:</p>
  
  <pre><code>dgVarConfig.Itemssource = mainController.loadVarConfigList();
  </code></pre>
  
  <p>But thats not what i want because i want to update the list via the grid (insert, delete, update lines => Mode=TwoWay)</p>
  
  <p>Any clue how i can fill the itemssource via xaml?</p>