protected override Rect GetBoundingRectangleCore() { // If this is not the selected tab, return the bounding Rect of just the TabHeader. if (!OwningTab.IsSelected && HeaderPeer != null) { return(HeaderPeer.GetBoundingRectangle()); } Rect r = base.GetBoundingRectangleCore(); if (HeaderPeer != null) { r.Union(HeaderPeer.GetBoundingRectangle()); } return(r); }
protected override Rect GetBoundingRectangleCore() { if (!OwningTab.IsSelected) { // Return BoundingRect of just the TabHeader if (HeaderPeer != null) { return(HeaderPeer.GetBoundingRectangle()); } } Rect r = base.GetBoundingRectangleCore(); if (HeaderPeer != null) { r.Union(HeaderPeer.GetBoundingRectangle()); } return(r); }