แก้ไข

แชร์ผ่าน


WebPartZoneBase.MenuPopupImageUrl Property

Definition

Gets or sets the URL to an image that opens the verbs drop-down menu in the title bar of each WebPart control in a zone.

public:
 virtual property System::String ^ MenuPopupImageUrl { System::String ^ get(); void set(System::String ^ value); };
public virtual string MenuPopupImageUrl { get; set; }
member this.MenuPopupImageUrl : string with get, set
Public Overridable Property MenuPopupImageUrl As String

Property Value

A string that represents the URL to an image used to open the verbs drop-down menu. The default value is an empty string ("").

Examples

The following code example demonstrates the declarative use of the MenuPopupImageUrl 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 MenuPopupImageUrl 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 an image placeholder (or an actual image if you assigned the path to one) appears in the verbs menu label for the control in WebPartZone2.

<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

If no value is assigned to the MenuPopupImageUrl property, a default image that looks like a downward arrow is provided to open the verbs drop-down menu in the title bar of a WebPart control.

Applies to

See also