Language

WebPartZoneBase.MenuLabelText プロパティ

定義

ゾーン内の各 WebPart コントロールのタイトル バーにある動詞ドロップダウン メニューのラベルとして機能する値を取得または設定します。

public:
 virtual property System::String ^ MenuLabelText { System::String ^ get(); void set(System::String ^ value); };
public virtual string MenuLabelText { get; set; }
member this.MenuLabelText : string with get, set
Public Overridable Property MenuLabelText As String

プロパティ値

動詞メニューのラベルに表示されるテキストを含む文字列。 既定値は空の文字列 ("") です。

例

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

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

注釈

MenuLabelText プロパティに値が割り当てられている場合、ラベルは、ゾーン内の各WebPart コントロールのタイトル バーの動詞ドロップダウン メニューを表す画像と共に表示されます。 プロパティに値が割り当てられていない場合は、イメージのみがメニューに表示されます。

このプロパティの値を設定すると、デザイナー ツールを使用してリソース ファイルに自動的に保存できます。 詳細については、「 LocalizableAttribute と グローバリゼーションとローカリゼーション」を参照してください。

適用対象

こちらもご覧ください