title: Create a WPF user control that it's focus behaves as a native control
body: <p>I had made a user control that is a replacement for the combo box, it has search and LINQ queries capabilities.</p>
  
  <p>The control is made by composition, it has a TextBox where the user type, a TextBlock that serves as the auto-complete label, a ListBox inside a Popup for the drop down and the drop down button.</p>
  
  <p>The problem is that each of this controls has its own focus, and when a consumer of this user control calls the SetFocus() for the user control, the focus is not setted to the TextBox, even if I subscribe to the GotFocus event, this is because the user control itself is not focusable.</p>
  
  <p>If instead I set the <strong>IsFocusable = True</strong> and <strong>KeyboardNavigation.IsTabStop = True</strong> the user control itself can be focused, but the text box its not focused, instead, a dotted line appears around the control</p>
  
  <p>I need that the user control behave the same way as the native ComboBox, when a consumer calls the SetFocus() the inner TextBox should be focusd</p>
  
  <p>I could expose a custom method for focusing the inner TextBox, but this is not an option because I have an attached property (from <a href="https://stackoverflow.com/questions/1356045/set-focus-on-textbox-in-wpf-from-view-model-c">this</a> question) that allows me to set the focus of any control from the ViewModel, thus the focus behaviour should be the same for all controls</p>