WebPartZoneBase.MenuPopupImageUrl 属性

定义

获取或设置图像的 URL,该图像打开区域中每个 WebPart 控件的标题栏中的谓词下拉菜单。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

属性值

表示图像的 URL 的字符串,该图像用于打开谓词下拉菜单。A string that represents the URL to an image used to open the verbs drop-down menu. 默认值为空字符串 ("")。The default value is an empty string ("").

示例

下面的代码示例演示了 WebPartZone 控件上 MenuPopupImageUrl 属性的声明性用法。The following code example demonstrates the declarative use of the MenuPopupImageUrl property on a WebPartZone control. 有关完整的代码示例,包括代码隐藏源文件和包含此代码中区域的 .aspx 页面,请参阅 WebPartZoneBase 类概述。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.

请注意,在声明性标记中,MenuPopupImageUrl 属性有一个分配给它的值。Notice that the MenuPopupImageUrl property has a value assigned to it in the declarative markup. 此值会影响 WebPartZone2This value impacts WebPartZone2. 将页面加载到浏览器中后,将页面切换到 "编辑" 模式,请注意,在 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>

注解

如果没有为 MenuPopupImageUrl 属性指定值,则将提供一个类似向下箭头的默认图像,以打开 WebPart 控件的标题栏中的谓词下拉菜单。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.

适用于

另请参阅