Export (0) Print
Expand All

VisualStyleRenderer.GetBackgroundContentRectangle Method

Returns the content area for the background of the current visual style element.

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

public Rectangle GetBackgroundContentRectangle (
	IDeviceContext dc,
	Rectangle bounds
)
public Rectangle GetBackgroundContentRectangle (
	IDeviceContext dc, 
	Rectangle bounds
)
public function GetBackgroundContentRectangle (
	dc : IDeviceContext, 
	bounds : Rectangle
) : Rectangle
Not applicable.

Parameters

dc

The IDeviceContext this operation will use.

bounds

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

Return Value

A Rectangle that contains the content area for the background 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 background area to calculate the content 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:
© 2015 Microsoft