title: WPF DataGrid: How to perform column binding using code behind?
body: <p>This is the column in question:</p>
  
  <pre><code>&lt;DataGridTextColumn
      Header=" Length "
      Width="Auto"
      Binding="{Binding Path=Length, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=0.00;;#}"
      ElementStyle="{StaticResource RightJustified}"
      x:Name="lengthColumn"&gt;
  &lt;/DataGridTextColumn&gt;
  </code></pre>
  
  <p>The problem is that I need to bind that column to some other property (called <code>Length48</code>) at run time.</p>
  
  <p>TIA.</p>