Share via


WebPartZoneBase.MenuLabelStyle プロパティ

定義

ゾーン内の各 WebPart コントロールのタイトル バーに表示される動詞ドロップダウン メニューのラベルのスタイル情報を取得します。

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

プロパティ値

動詞メニューのラベルのスタイル情報を含む Style

属性

次のコード例では、コントロールで プロパティを MenuLabelStyle 宣言的に使用する方法を WebPartZone 示します。 分離コード ソース ファイルや、このコードのゾーンを含む .aspx ページなど、完全なコード例については、クラスの概要に関するページを WebPartZoneBase 参照してください。

プロパティには MenuLabelStyle 、宣言型マークアップで値が割り当てられていることに注意してください。 この値は に影響します 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>

注釈

プロパティは MenuLabelStyle 、ラベルに画像、テキスト、またはその両方が含まれているかどうかに関係なく、ゾーン内の各 Web パーツ コントロールの動詞メニューのラベルのスタイルに影響します。

適用対象

こちらもご覧ください