Menu.DynamicMenuItemStyle プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Menu.DynamicMenuItemStyle プロパティの意味・解説 

Menu.DynamicMenuItemStyle プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

動的メニューの中のメニュー項目の外観設定できる、MenuItemStyle オブジェクトへの参照取得します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public ReadOnly Property
 DynamicMenuItemStyle As MenuItemStyle
Dim instance As Menu
Dim value As MenuItemStyle

value = instance.DynamicMenuItemStyle
public MenuItemStyle DynamicMenuItemStyle { get;
 }
public:
property MenuItemStyle^ DynamicMenuItemStyle {
    MenuItemStyle^ get ();
}
/** @property */
public MenuItemStyle get_DynamicMenuItemStyle ()
public function get DynamicMenuItemStyle
 () : MenuItemStyle

プロパティ
動的メニューの中のメニュー項目のスタイルを表す MenuItemStyle への参照

解説解説

動的メニューの中のメニュー項目の外観制御するには、DynamicMenuItemStyle プロパティ使用します。このプロパティ読み取り専用です。ただし、このプロパティ返す MenuItemStyle オブジェクトプロパティ設定することはできます。このプロパティは、Property-Subproperty形式で、宣言によって設定できますSubproperty には、MenuItemStyle オブジェクトプロパティ指定します (例 : DynamicMenuItemStyle-ForeColor)。Property.Subproperty形式で、プロパティプログラムによって設定することもできます (例 : DynamicMenuItemStyle.ForeColor)。

動的メニュー項目のスタイル プロパティは、次の順序適用されます。

  1. DynamicMenuStyle.

  2. DynamicMenuItemStyle。LevelMenuItemStyles コレクションまたは LevelSubMenuStyles コレクション定義されている場合は、ここで適用され、他のメニュー項目スタイル プロパティオーバーライドます。

  3. DynamicSelectedStyle。LevelSelectedStyles コレクション定義されている場合は、ここで適用され、他のメニュー項目スタイル プロパティオーバーライドます。

  4. DynamicHoverStyle.

使用例使用例

DynamicMenuItemStyle プロパティ使用して動的メニューの中のメニュー項目の背景色明る空色指定する方法コード例次に示します

<%@ Page Language="VB" %>

<html>
  <body>
    <form runat="server">
    
      <h3>Menu DynamicMenuItemStyle Example</h3>
    
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        target="_blank"  
        runat="server">
        
        <dynamicmenuitemstyle backcolor="LightSkyBlue"
          forecolor="Black"
          borderstyle="Solid"
          borderwidth="1"
          bordercolor="Black"/>
      
        <items>
          <asp:menuitem navigateurl="Home.aspx"
 
            text="Home"
            tooltip="Home">
            <asp:menuitem navigateurl="Music.aspx"
              text="Music"
              tooltip="Music">
              <asp:menuitem navigateurl="Classical.aspx"
 
                text="Classical"
                tooltip="Classical"/>
              <asp:menuitem navigateurl="Rock.aspx"
                text="Rock"
                tooltip="Rock"/>
              <asp:menuitem navigateurl="Jazz.aspx"
                text="Jazz"
                tooltip="Jazz"/>
            </asp:menuitem>
            <asp:menuitem navigateurl="Movies.aspx"
              text="Movies"
              tooltip="Movies">
              <asp:menuitem navigateurl="Action.aspx"
                text="Action"
                tooltip="Action"/>
              <asp:menuitem navigateurl="Drama.aspx"
                text="Drama"
                tooltip="Drama"/>
              <asp:menuitem navigateurl="Musical.aspx"
                text="Musical"
                tooltip="Musical"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>
      
      </asp:menu>

    </form>
  </body>
</html>

<%@ Page Language="C#" %>

<html>
  <body>
    <form runat="server">
    
      <h3>Menu DynamicMenuItemStyle Example</h3>
    
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        target="_blank"  
        runat="server">
        
        <dynamicmenuitemstyle backcolor="LightSkyBlue"
          forecolor="Black"
          borderstyle="Solid"
          borderwidth="1"
          bordercolor="Black"/>
      
        <items>
          <asp:menuitem navigateurl="Home.aspx" 
            text="Home"
            tooltip="Home">
            <asp:menuitem navigateurl="Music.aspx"
              text="Music"
              tooltip="Music">
              <asp:menuitem navigateurl="Classical.aspx" 
                text="Classical"
                tooltip="Classical"/>
              <asp:menuitem navigateurl="Rock.aspx"
                text="Rock"
                tooltip="Rock"/>
              <asp:menuitem navigateurl="Jazz.aspx"
                text="Jazz"
                tooltip="Jazz"/>
            </asp:menuitem>
            <asp:menuitem navigateurl="Movies.aspx"
              text="Movies"
              tooltip="Movies">
              <asp:menuitem navigateurl="Action.aspx"
                text="Action"
                tooltip="Action"/>
              <asp:menuitem navigateurl="Drama.aspx"
                text="Drama"
                tooltip="Drama"/>
              <asp:menuitem navigateurl="Musical.aspx"
                text="Musical"
                tooltip="Musical"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>
      
      </asp:menu>

    </form>
  </body>
</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Menu クラス
Menu メンバ
System.Web.UI.WebControls 名前空間
Menu.DynamicHoverStyle プロパティ
DynamicMenuStyle
DynamicSelectedStyle
LevelMenuItemStyles
LevelSelectedStyles
LevelSubMenuStyles
StaticHoverStyle
StaticMenuItemStyle
StaticMenuStyle
StaticSelectedStyle


このページでは「.NET Framework クラス ライブラリ リファレンス」からMenu.DynamicMenuItemStyle プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からMenu.DynamicMenuItemStyle プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMenu.DynamicMenuItemStyle プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Menu.DynamicMenuItemStyle プロパティ」の関連用語

Menu.DynamicMenuItemStyle プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Menu.DynamicMenuItemStyle プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS