title: How to Get element inside the content control
body: <p>I need to find the element inside the content control :</p>
  
  <pre><code>&lt;ContentControl Content="{Binding YourChoices}" Grid.ColumnSpan="3" x:Name="ccBloodGroup"&gt;
                  &lt;ContentControl.ContentTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;Grid&gt;
                              &lt;ComboBox x:Name="cbBloodGroup" ItemsSource="{Binding}" HorizontalAlignment="Left" Margin="10,160,0,0" VerticalAlignment="Top" Width="331" Height="45"&gt;
                                  &lt;ComboBoxItem&gt;A+&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;A-&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;B+&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;B-&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;O+&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;O-&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;AB+&lt;/ComboBoxItem&gt;
                                  &lt;ComboBoxItem&gt;AB-&lt;/ComboBoxItem&gt;
                              &lt;/ComboBox&gt;
                              &lt;TextBlock x:Name="tb" Text=" Blood Type" IsHitTestVisible="False" Visibility="Hidden" HorizontalAlignment="Left" Margin="10,176,0,0" VerticalAlignment="Top"/&gt;
                          &lt;/Grid&gt;
                          &lt;DataTemplate.Triggers&gt;
                              &lt;Trigger SourceName="cbBloodGroup" Property="SelectedItem" Value="{x:Null}"&gt;
                                  &lt;Setter TargetName="tb" Property="Visibility" Value="Visible"/&gt;
                              &lt;/Trigger&gt;
                          &lt;/DataTemplate.Triggers&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ContentControl.ContentTemplate&gt;
              &lt;/ContentControl&gt;
  </code></pre>
  
  <p>I found an answer on Internet as </p>
  
  <pre><code> ComboBox cb = ccBloodGroup.ContentTemplate.FindName("cbBloodGroup", ccBloodGroup) as ComboBox;
  </code></pre>
  
  <p>But this is giving me an run time exception saying 'This operation is valid only on elements that have this template applied.' </p>
  
  <p>Please help.. </p>