VitNX_DockGroup.OnPaint Method

Raises the Paint event.
protected override void OnPaint( 
PaintEventArgs e 
)
This language is not supported or no code example is available.

Parameters

e
PaintEventArgs

A PaintEventArgs that contains the event data.

protected override void OnPaint(PaintEventArgs e)
 {
     var g = e.Graphics;
     using (var b = new SolidBrush(Colors.GreyBackground))
         g.FillRectangle(b, ClientRectangle);
     if (!_tabArea.Visible)
         return;
     using (var b = new SolidBrush(Colors.MediumBackground))
         g.FillRectangle(b, _tabArea.ClientRectangle);
     foreach (var tab in _tabs.Values)
     {
         if (DockArea == VitNX_DockArea.Document)
             PaintDocumentTab(g, tab);
         else
             PaintToolWindowTab(g, tab);
     }
     if (DockArea == VitNX_DockArea.Document)
     {
         var isActiveGroup = DockPanel.ActiveGroup == this;
         var divColor = isActiveGroup ? Colors.BlueSelection : Colors.GreySelection;
         using (var b = new SolidBrush(divColor))
         {
             var divRect = new Rectangle(_tabArea.ClientRectangle.Left,
                 _tabArea.ClientRectangle.Bottom - 2,
                 _tabArea.ClientRectangle.Width, 2);
             g.FillRectangle(b, divRect);
         }
         var dropdownRect = new Rectangle(_tabArea.DropdownRectangle.Left,
             _tabArea.DropdownRectangle.Top,
             _tabArea.DropdownRectangle.Width,
             _tabArea.DropdownRectangle.Height - 2);
         using (var b = new SolidBrush(Colors.MediumBackground))
             g.FillRectangle(b, dropdownRect);
         using (var img = DockIcons.arrow)
             g.DrawImageUnscaled(img, dropdownRect.Left + (dropdownRect.Width / 2) - (img.Width / 2),
                 dropdownRect.Top + (dropdownRect.Height / 2) - (img.Height / 2) + 1);
     }
 }
					
This language is not supported or no code example is available.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

.NET Core

Supported in: 5.0+, 6.0+

In this article

Definition