System.Windows.Forms.VisualStyles.VisualStyleRenderer.GetBackgroundExtent Method

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

Syntax

public System.Drawing.Rectangle GetBackgroundExtent (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle contentBounds)

Parameters

dc
The System.Drawing.IDeviceContext this operation will use.
contentBounds
A System.Drawing.Rectangle that contains the content area of the current visual style element.

Returns

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

Remarks

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.

Requirements

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0