WebPartZoneBase.MenuPopupImageUrl 屬性

定義

取得或設定影像的 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

屬性值

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 開啟動詞下拉式功能表。

適用於

另請參閱