SHARE
TWEET

Untitled

a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// <summary>
  2.     /// This is the method that responds to the MouseLeftButtonDownEvent event.
  3.     /// </summary>
  4.     /// <param name="e"></param>
  5.     protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
  6.     {
  7.         // We should process only the direct events in case TabItem is the selected one
  8.         // otherwise we are getting this event when we click on TabItem content because it is in the logical subtree
  9.         if (e.Source == this || !IsSelected)
  10.         {
  11.             if (SetFocus())
  12.                 e.Handled = true;
  13.         }
  14.         base.OnMouseLeftButtonDown(e);
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top