WebPartMenuStyle Class
Contains style characteristics for menus on WebPart controls. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class WebPartMenuStyle sealed : public TableStyle, ICustomTypeDescriptor
The WebPartMenuStyle class is essentially a TableStyle object, which contains style characteristics to apply to menus on WebPart controls.
The Web Parts control set uses the WebPartMenuStyle object to determine the style characteristics of the verbs menu on a WebPart control. A verbs menu is contained in the title bar of each WebPart control, and it includes various user interface (UI) actions (called verbs) that users can perform, such as closing, minimizing, exporting, or deleting a control.
Important Note: |
|---|
You can set style attributes on the WebPartMenuStyle object, and thus on the verbs menu of all the WebPart controls in a zone, by using the MenuPopupStyle property on a WebPartZoneBase zone. |
The WebPartMenuStyle class has two important properties. The first is the HorizontalAlign property, which determines whether the content of the menu is aligned on the left, the center, or the right of the control or the alignment is not set. The ShadowColor property determines the color of the shadow for the menu on a WebPart control, if the menu shadowing feature is enabled on the user's system.
The WebPartMenuStyle class also has some critical methods. The CopyFrom method copies nonblank style elements from the style object passed into the method, and applies them to the WebPartMenuStyle object, overwriting any existing style elements in the process. The MergeWith method similarly copies nonblank style elements from the style object passed to the method, but it does not overwrite existing style elements in the WebPartMenuStyle object. The Reset method removes any defined style elements from the WebPartMenuStyle object's state bag.
The WebPartMenuStyle class also implements all the methods contained in the ICustomTypeDescriptor interface. In general, this enables the WebPartMenuStyle class to be applied to different types of menus.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System::MarshalByRefObject
System.ComponentModel::Component
System.Web.UI.WebControls::Style
System.Web.UI.WebControls::TableStyle
System.Web.UI.WebControls.WebParts::WebPartMenuStyle
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Important Note: