VisualStyleRenderer.GetBackgroundContentRectangle Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the content area for the background of the current visual style element.
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
Parameters
The IDeviceContext this operation will use.
- bounds
- Rectangle
A Rectangle that contains the entire background area of the current visual style element.
Returns
A Rectangle that contains the content area for the background of the current visual style element.
Exceptions
dc
is null
.
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 background area to calculate the content area for the current visual style element.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈