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

適用対象

こちらもご覧ください