title: How to set focus to a textbox within content control when clicked?
body: <p>I have a View which contains two views within the view (these are contained within a ContainerControl).
  On the other side of the View there's a <strong>Telerik GridView</strong> where the user can select a row. When a row is selected the other side of the View is dynamically changed to another View (and ViewModel). The dynamic view is a simple Grid with a lots of TextBoxes, so nothing special there.</p>
  
  <p>Now when a user wants to enter values to the dynamically loaded View, he has to first click the <code>ContentControl</code> and then click again to a <code>TextBox</code> he wants to focus. This only happens when the GridView's row is in <strong>Edit Mode</strong>.</p>
  
  <p>I've tried setting the ContentControl's <code>FocusManager.IsFocusScope="False"</code>.</p>
  
  <p>I've also tried settings all other controls with <code>IsFocusable=False</code>.</p>
  
  <p>I know there must be a way to do this with WPF events, but I'm not an expert on this area.</p>
  
  <p>I'm settings the dynamic View using Catel's converter like this (don't know it it's relevant): </p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;ContentControl Content="{Binding SelectedItemViewModel, Mode=TwoWay, Converter={catel:ViewModelToViewConverter}}" /&gt;
  </code></pre>
  
  <p>ViewModel:</p>
  
  <pre><code>public MyDataModel SelectedItem
  {
      get { return GetValue&lt;MyDataModel&gt;(SelectedItemProperty); }
      set
      {
           SetValue(SelectedItemProperty, value);
           RaisePropertyChanged(() =&gt; SelectedItemViewModel);
      }
  }
  public static readonly PropertyData SelectedItemProperty = RegisterProperty("SelectedItem", typeof(MyDataModel));
  
      public ViewModelBase SelectedItemViewModel
      {
          get
          {
              if (SelectedItem != null)
              {
                  switch (SelectedItem.Type)
                  {
                      case 1:
                          return new OneViewModel(SelectedItem);
                      case 2:
                          return new TwoViewModel(SelectedItem);
                  }
              }
  
              return null;
          }
      }
  </code></pre>