title: Set Binding in ItemsSource in DataGrid programmatically
body: <p>I have the next XAML code:</p>
  
  <pre><code>&lt;DataGrid x:Name="some_name" AutoGenerateColumns="False"&gt;   
                  &lt;DataGrid.ItemsSource&gt;
                      &lt;Binding XPath="Setting/Element[@Name='...']/Field"/&gt;
                  &lt;/DataGrid.ItemsSource&gt;
                  &lt;DataGrid.Columns&gt;
                      &lt;DataGridTextColumn Header="Name" Width="*" Binding="{Binding XPath=@Name}"/&gt;
                      &lt;DataGridTextColumn Header="Type" Width="80" Binding="{Binding XPath=@Type}"/&gt;
                      &lt;DataGridTextColumn Header="Count" Binding="{Binding XPath=@Count}"/&gt;
                      &lt;DataGridTextColumn Header="ID" Width="80" Binding="{Binding XPath=@ID}"/&gt;
                  &lt;/DataGrid.Columns&gt;                    
              &lt;/DataGrid&gt;
  </code></pre>
  
  <p>How can I set <code>Binding</code> with <code>XPath="Setting/Element[@Name='...']/Field"</code> in the C# code?</p>