VisualStyleRenderer.DrawParentBackground(IDeviceContext, Rectangle, Control) 方法

定义

在指定区域中绘制控件的父级的背景。Draws the background of a control's parent in the specified area.

public:
 void DrawParentBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::Windows::Forms::Control ^ childControl);
public void DrawParentBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, System.Windows.Forms.Control childControl);
member this.DrawParentBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Windows.Forms.Control -> unit
Public Sub DrawParentBackground (dc As IDeviceContext, bounds As Rectangle, childControl As Control)

参数

dc
IDeviceContext

用于绘制 childControl 的父级的背景的 IDeviceContextThe IDeviceContext used to draw the background of the parent of childControl. 此对象通常属于子控件。This object typically belongs to the child control.

bounds
Rectangle

要在其中绘制父控件的背景的 RectangleA Rectangle in which to draw the parent control's background. 此矩形应位于子控件的边界之内。This rectangle should be inside the child control's bounds.

childControl
Control

将绘制其父控件的背景的控件。The control whose parent's background will be drawn.

异常

dcnulldc is null.

适用于