WebPartZoneBase.MinimizeWebPart(WebPart) 方法

定义

最小化区域中选定的 WebPart 控件。Minimizes a selected WebPart control in a zone.

protected:
 virtual void MinimizeWebPart(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
protected virtual void MinimizeWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);
abstract member MinimizeWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.MinimizeWebPart : System.Web.UI.WebControls.WebParts.WebPart -> unit
Protected Overridable Sub MinimizeWebPart (webPart As WebPart)

参数

webPart
WebPart

要最小化的 WebPart 控件。The WebPart control to be minimized.

例外

webPartnullwebPart is null.

注解

当用户单击 WebPart 控件上的最小化谓词时,将调用 MinimizeWebPart 方法。The MinimizeWebPart method is called when a user clicks the minimize verb on a WebPart control. 方法将所选 WebPart 控件的 ChromeState 属性值设置为 "Minimized"。The method sets the ChromeState property value for the selected WebPart control to Minimized. 最小化的 WebPart 控件在其区域中折叠并隐藏其内容,并且只有其标题栏保持可见。A minimized WebPart control collapses within its zone and hides its contents, and only its title bar remains visible.

方法只应由派生 WebPartZoneBase 区域(如 WebPartZone)使用。The method should only be used by derived WebPartZoneBase zones such as WebPartZone.

适用于

另请参阅