Version

DrawBackColor Method (RibbonCaptionAreaUIElement)

Default backcolor drawing just does a FillRectangle with the backcolor.
Syntax
'Declaration
 
Protected Overrides Sub DrawBackColor( _
   ByRef drawParams As Infragistics.Win.UIElementDrawParams _
) 
protected override void DrawBackColor( 
   ref Infragistics.Win.UIElementDrawParams drawParams
)

Parameters

drawParams
The Infragistics.Win.UIElementDrawParams used to provide rendering information.
Example
This sample overrides the virtual method DrawBackColor on UIElement. It calls the base implementation then draws a semi transparant hatch.

Imports System.Drawing
Imports System.Drawing.Drawing2D  
Imports Infragistics.Win

Protected Overrides Sub DrawBackColor(ByRef drawParams As UIElementDrawParams)
      
		' First Draw background.
       MyBase.DrawBackColor(drawParams)

		' Draw a hatch pattern over the control.
       Dim brush As HatchBrush = New HatchBrush(HatchStyle.Percent50, Color.White, Color.Transparent)

       drawParams.Graphics.FillRectangle(brush, drawParams.InvalidRect)
       brush.Dispose()

   End Sub
using System.Drawing;
using System.Drawing.Drawing2D;	
using Infragistics.Win;

protected override void DrawBackColor(ref UIElementDrawParams drawParams)
{

	//First Draw background.
	base.DrawBackColor( ref drawParams );

	//Draw a hatch pattern over the control.
	HatchBrush brush = new Drawing2D.HatchBrush( HatchStyle.Percent50, Color.White, Color.Transparent );

	drawParams.Graphics.FillRectangle( brush, drawParams.InvalidRect );
	brush.Dispose();

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also