WebPartZoneBase.MenuVerbStyle Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets style information for the appearance of a verb in a verbs drop-down menu when the menu is displayed.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public Style MenuVerbStyle { get; }

Property Value

Type: System.Web.UI.WebControls.Style

A Style that contains style information for a verb displayed in a verbs menu.

The style information contained in the MenuVerbStyle property applies to each individual verb in a verbs menu.

Although this property is read-only, you can set the style attributes of the underlying Style object.

The following code example demonstrates the declarative use of the MenuVerbStyle property on a WebPartZone control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the WebPartZoneBase class overview.

Notice that the MenuVerbStyle property has a value assigned to it in the declarative markup. This value impacts WebPartZone2. After you load the page into a browser, switch the page into edit mode. Click the verbs menu, and notice that the font style for the verbs menu on the control in WebPartZone2 is the style assigned to it in the declarative markup.

<asp:WebPartZone 
  ID="WebPartZone2"
  Runat="server" 
  DragHighlightColor="#00ff00"
  AllowLayoutChange="true"
  EmptyZoneText="Add WebParts to this empty Zone."
  BorderWidth="2"
  BorderColor="DarkBlue"
  BorderStyle="Dashed" 
  MenuLabelText="Verbs Menu" 
  MenuPopupImageUrl="label.gif" >
  <VerbStyle Font-Italic="true" />
  <MenuLabelStyle BackColor="Lime" BorderWidth="1"  />
  <MenuLabelHoverStyle Font-Bold="true" />
  <MenuVerbHoverStyle BackColor="LightGrey" />
  <MenuVerbStyle Font-Italic="true" /> 
  <ZoneTemplate>
    <asp:Label ID="Label1" Runat="server" Title="Date" />
  </ZoneTemplate>
</asp:WebPartZone>

.NET Framework
Available since 2.0
Return to top
Show: