VisualStyleRenderer.GetBackgroundContentRectangle 方法

定義

傳回目前可視化樣式專案背景的內容區域。

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

參數

dc
IDeviceContext

IDeviceContext這次行動將使用。

bounds
Rectangle

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

傳回

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

例外狀況

dcnull

備註

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

適用於