title: Connection between Grid Column and Column Definition WPF
body: <p>First of all, I am new to WPF and I am trying to find the proper approach to dynamically resize Column Definitions of a Grid</p>
  
  <pre><code>  &lt;Grid x:Name="uxFootbarGrid" Height="40" Margin="0" VerticalAlignment="Bottom"&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="7*"/&gt;
                          &lt;ColumnDefinition Width="8*"/&gt;
                          &lt;ColumnDefinition Width="105*"/&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid x:Name="uxOrderStatusGrid" Margin="0" d:LayoutOverrides="LeftMargin, RightMargin, TopMargin, BottomMargin"&gt;
                          &lt;TextBox Margin="0" TextWrapping="Wrap" Text="Status: CMP" VerticalContentAlignment="Center" Background="{x:Null}" BorderThickness="0" Foreground="White" Grid.Column="1"/&gt;
                      &lt;/Grid&gt;
                      &lt;Grid Grid.Column="1" Margin="0" d:LayoutOverrides="LeftMargin, RightMargin, TopMargin, BottomMargin"&gt;
                          &lt;TextBox x:Name="uxProcessingTextBox" Margin="0" Grid.Column="2" TextWrapping="Wrap" Text="Processing: D" Background="{x:Null}" Foreground="White" VerticalContentAlignment="Center" BorderThickness="0" TextChanged="uxProcessingTextBox_TextChanged"/&gt;
                      &lt;/Grid&gt;
  
                  &lt;/Grid&gt;
  </code></pre>
  
  <p>I have Grids inside of Grid. I am trying programatically to find the connection between those.</p>
  
  <p>The idea is:</p>
  
  <pre><code>foreach(column in masterGrid)
  {
     getAllTextBoxes()
     getTotalWidth()
     setWidthToColumnDefinitionOfMasterGrid()
  }
  </code></pre>
  
  <p>All good at the moment, but I cannot find relation between Control and the Column Definition they belong to.</p>