WebPartZoneBase.MenuPopupImageUrl 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置图像的 URL,该图像打开区域中每个 WebPart 控件的标题栏中的谓词下拉菜单。
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 的字符串,该图像用于打开谓词下拉菜单。 默认值为空字符串 ("")。
示例
下面的代码示例演示控件上WebPartZone属性的MenuPopupImageUrl声明性用法。 有关完整代码示例,包括代码隐藏源文件和包含此代码中的区域的 .aspx 页,请参阅 WebPartZoneBase 类概述。
请注意,该 MenuPopupImageUrl 属性在声明性标记中为其分配了一个值。 此值会影响 WebPartZone2
。 将页面加载到浏览器中后,将页面切换到编辑模式,请注意,如果为控件的谓词菜单标签 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 打开谓词下拉菜单。