Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// This is the method that responds to the MouseLeftButtonDownEvent event.
- /// </summary>
- /// <param name="e"></param>
- protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
- {
- // We should process only the direct events in case TabItem is the selected one
- // otherwise we are getting this event when we click on TabItem content because it is in the logical subtree
- if (e.Source == this || !IsSelected)
- {
- if (SetFocus())
- e.Handled = true;
- }
- base.OnMouseLeftButtonDown(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement