WebPartZoneBase.MenuLabelHoverStyle 屬性

定義

取得樣式屬性,這些屬性是在使用者將滑鼠指標置於標籤上時,套用至 WebPart 控制項標題列中動詞命令的標籤。

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

屬性值

Style

Style,包含動詞命令功能表中標籤的樣式屬性。

屬性

範例

下列程式碼範例示範 控制項上 WebPartZone 屬性的 MenuLabelHoverStyle 宣告式用法。 如需完整的程式碼範例,包括程式碼後置原始程式檔和包含此程式碼中區域的 .aspx 頁面,請參閱 WebPartZoneBase 類別概觀。

請注意, MenuLabelHoverStyle 屬性在宣告式標記中指派給它的值。 這個值會影響 WebPartZone2 。 將頁面載入瀏覽器之後,請將頁面切換為編輯模式,並將滑鼠指標放在Web 組件控制項的動詞功能表上方。 請注意,標籤的文字會變成粗體。

<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>

備註

屬性 MenuLabelHoverStyle 會影響區域中每個Web 組件控制項中動詞功能表的整個標籤樣式。

適用於

另請參閱