VisualStyleRenderer.GetBackgroundExtent(IDeviceContext, Rectangle) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回目前可視化樣式專案的整個背景區域。
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
參數
IDeviceContext這次行動將使用。
傳回
Rectangle A 包含當前視覺風格元素的整個背景區域。
例外狀況
dc 是 null。
備註
視覺風格可以在每張背景圖片中定義一個內容區域。 這是文字和圖示等內容可以放置而不覆蓋背景邊框的區域。 此方法利用給定的內容區域來計算當前視覺風格元素的整個背景區域。