VisualStyleRenderer.GetBackgroundExtent(IDeviceContext, Rectangle) 方法

定義

傳回目前視覺化樣式項目的整個背景區域。

public:
 System::Drawing::Rectangle GetBackgroundExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle contentBounds);
public System.Drawing.Rectangle GetBackgroundExtent (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle contentBounds);
member this.GetBackgroundExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle -> System.Drawing.Rectangle
Public Function GetBackgroundExtent (dc As IDeviceContext, contentBounds As Rectangle) As Rectangle

參數

dc
IDeviceContext

此作業將使用的 IDeviceContext

contentBounds
Rectangle

Rectangle,包含目前視覺化樣式項目的內容區域。

傳回

Rectangle

Rectangle,包含目前視覺化樣式項目的整個背景區域。

例外狀況

dcnull

備註

視覺化樣式可以定義每個背景影像內的內容區域。 這是可以在不覆寫背景框線的情況下放置文字和圖示等內容的區域。 這個方法會使用指定的內容區域來計算目前視覺化樣式專案的整個背景區域。

適用於