title: How to select the textbox in data template
body: <p>while programming for windows phone 7, I created a listbox and using DataTemplate which contains a textblock and a textbox. The textbox is hided by default.</p>
  
  <p>The XAML:</p>
  
  <pre><code>&lt;ListBox&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Canvas Width="460" Height="60" Background="{StaticResource PhoneAccentBrush}"&gt;
                      &lt;TextBlock Text="{Binding data}" FontSize="30" Margin="10,10,10,0"/&gt;
                      &lt;TextBox Height="60" Width="460" Visibility="Collapsed"/&gt;
                  &lt;/Canvas&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p><strong>The effect I wanna accomplish is : Tap textblock to hide textblock while show textbox.</strong></p>
  
  <p>CODE BEHIND:</p>
  
  <pre><code>private void TextBlock_Tap(object sender, GestureEventArgs e)
      {
          TextBlock.Visibilty = Visibility.Collapsed;
          TextBox.Visibilty = Visibility.Visible;
      }
  </code></pre>
  
  <p>However, obviously the selector isn't correct. I tried to add Name for textbox and textblock, but Name seems does not work in Data Template. Is there anyone who can tell me how can i select the textblock and textbox in a Data Template please? Many Thanks!!!</p>