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 A 包含當前視覺風格元素的內容區域。

傳回

Rectangle A 包含當前視覺風格元素的整個背景區域。

例外狀況

dcnull

備註

視覺風格可以在每張背景圖片中定義一個內容區域。 這是文字和圖示等內容可以放置而不覆蓋背景邊框的區域。 此方法利用給定的內容區域來計算當前視覺風格元素的整個背景區域。

適用於