/// <summary> /// Draws the content of a <see cref="T:System.Windows.Media.DrawingContext" /> object during the render pass of a <see cref="T:System.Windows.Controls.Panel" /> element. /// </summary> /// <param name="dc">The <see cref="T:System.Windows.Media.DrawingContext" /> object to draw.</param> protected override void OnRender(DrawingContext dc) { base.OnRender(dc); if (HeaderRenderer == null) { HeaderRenderer = new TabItemsHeaderRenderer(); } HeaderRenderer.Render(dc, this); }
/// <summary> /// Draws the content of a <see cref="T:System.Windows.Media.DrawingContext" /> object during the render pass of a <see cref="T:System.Windows.Controls.Panel" /> element. /// </summary> /// <param name="dc">The <see cref="T:System.Windows.Media.DrawingContext" /> object to draw.</param> protected override void OnRender(DrawingContext dc) { base.OnRender(dc); if (PrimaryAreaBackground != null) { dc.DrawRectangle(PrimaryAreaBackground, null, new Rect(_currentPrimaryArea.X, 0, _currentPrimaryArea.Width, ActualHeight)); } if (SecondaryAreaBackground != null) { dc.DrawRectangle(SecondaryAreaBackground, null, new Rect(_currentSecondaryArea.X, 0, _currentSecondaryArea.Width, ActualHeight)); } if (HeaderRenderer != null) { HeaderRenderer.Render(dc, _currentPrimaryArea, _currentSecondaryArea, this); } }