title: how to access a child element dynamically in WPF
body: <p>In WPF, I have a structure like this</p>
  
  <pre><code>&lt;Button&gt;
      &lt;Grid&gt;
          &lt;!--definitions for 1 row and 2 columns--&gt;
          &lt;TextBlock x:Name="t1" Grid.Column="0"/&gt;
          &lt;TextBlock x:Name="t2" Grid.Column="1"/&gt;
      &lt;/Grid&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>Supposed a <code>Button b</code> with this structure is generated dynamically. How to access <code>t1</code> from <code>Button b</code>?</p>
  
  <p>Edit for clarification: Since <code>t1</code> resides within <code>Button b</code>, is it possible to change the content of <code>t1</code> if one only have access to <code>b</code>? something along the line of <code>b.childGridElement.childTextBlock_t1.Text = "newString"</code>?</p>