title: In WPF, is OnLostKeyboardFocus guaranteed to be called after OnGotKeyboardFocus?
body: <p>I have code that looks like this:</p>
  
  <pre><code>  class MyUserControl : Control { ...
      protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
      {
          base.OnGotKeyboardFocus(e);
  
          StartDoingSomethingRisky()
      }
  
      protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
      {
          base.OnLostKeyboardFocus(e);
  
          StopDoingSomethingRisky();
      }
  </code></pre>
  
  <p>Should I be worried that in some circumstances I may continue the risky operation even after MyUserControl has disappeared, or have I covered 100% of cases?</p>