title: Set focus to element
body: <p>There are a button and a textbox. I added a "KeyDown" event to textbox so that when "enter" is pressed button gets clicked. Good, then I tried to give focus to textbox again but failed. In the code below I tried three ways but neither is working.</p>
  
  <pre><code>private void txt_addRemove_KeyDown(object sender, KeyEventArgs e)
  {
      if (e.Key == Key.Return)
      {               
          btn_BC_add.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
  
          // 1.way
          // IInputElement focusedElement = FocusManager.GetFocusedElement(txt_addRemove);
          // 2.way
          // Keyboard.Focus(txt_addRemove);
          // 3.way
          // txt_addRemove.Focus();
      }
  }
  </code></pre>