Editare

Partajați prin


WebPartZoneBase.MenuLabelStyle Property

Definition

Gets style information for the label of the verbs drop-down menu that appears in the title bar of each WebPart control in a zone.

public:
 property System::Web::UI::WebControls::Style ^ MenuLabelStyle { System::Web::UI::WebControls::Style ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.Style MenuLabelStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.MenuLabelStyle : System.Web.UI.WebControls.Style
Public ReadOnly Property MenuLabelStyle As Style

Property Value

A Style that contains style information for the label of the verbs menu.

Attributes

Examples

The following code example demonstrates the declarative use of the MenuLabelStyle 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 MenuLabelStyle 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, and notice that the color for the verbs menu label in WebPartZone2 is the color 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>
<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>

Remarks

The MenuLabelStyle property affects the style of the label on the verbs menu of each Web Parts control in a zone, regardless of whether the label contains an image, text, or both.

Applies to

See also