VisualStyleRenderer.GetBackgroundExtent Method

Returns the entire background area for the current visual style element.

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public Rectangle GetBackgroundExtent (
	IDeviceContext dc,
	Rectangle contentBounds
)
public Rectangle GetBackgroundExtent (
	IDeviceContext dc, 
	Rectangle contentBounds
)
public function GetBackgroundExtent (
	dc : IDeviceContext, 
	contentBounds : Rectangle
) : Rectangle
Not applicable.

Parameters

dc

The IDeviceContext this operation will use.

contentBounds

A Rectangle that contains the content area of the current visual style element.

Return Value

A Rectangle that contains the entire background area of the current visual style element.

Exception typeCondition

ArgumentNullException

dc is a null reference (Nothing in Visual Basic).

A visual style can define a content area within each background image. This is the area in which content such as text and icons can be placed without overwriting background borders. This method uses the given content area to calculate the entire background area for the current visual style element.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: