private void HandleMouseInTitle(MouseEventArgs e) { TabControlItem item = this.GetTabItemByPoint(e.Location); if (item != null) { var inTitle = item.LocationIsInTitle(e.Location); TabControlMouseOnTitleEventArgs args = new TabControlMouseOnTitleEventArgs(item); if (inTitle) { this.OnTabControlMouseOnTitle(args); if (!this.mouseEnteredTitle) { this.mouseEnteredTitle = true; this.OnTabControlMouseEnteredTitle(args); } } else if (this.mouseEnteredTitle) { this.mouseEnteredTitle = false; this.OnTabControlMouseLeftTitle(args); } } }
private void OnTabControlMouseLeftTitle(TabControlMouseOnTitleEventArgs e) { if (this.TabControlMouseLeftTitle != null) { this.TabControlMouseLeftTitle(e); } }