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

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

Menu.DynamicHoverStyle プロパティ

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

マウス ポインタが上に置かれているときの動的メニュー外観設定できるStyle オブジェクトへの参照取得します

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

Dim instance As Menu
Dim value As Style

value = instance.DynamicHoverStyle
public Style DynamicHoverStyle { get; }
public:
property Style^ DynamicHoverStyle {
    Style^ get ();
}
/** @property */
public Style get_DynamicHoverStyle ()
public function get DynamicHoverStyle
 () : Style

プロパティ
マウス ポインタが上に置かれているときの動的メニュー項目のスタイルを表す Style への参照

解説解説

マウス ポインタが上に置かれているときの動的メニュー項目の外観制御するには、DynamicHoverStyle プロパティ使用します。このプロパティ読み取り専用です。ただし、このプロパティ返す Style オブジェクトプロパティ設定することはできます。このプロパティは、Property-Subproperty形式で、宣言によって設定できますSubproperty には、Style オブジェクトプロパティ指定します (例 : DynamicHoverStyle-ForeColor)。Property.Subproperty形式で、プロパティプログラムによって設定することもできます (例 : DynamicHoverStyle.ForeColor)。

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

  1. DynamicMenuStyle.

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

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

  4. DynamicHoverStyle.

使用例使用例

DynamicHoverStyle プロパティ使用してユーザーマウス ポインタ置いたときに動的メニュー項目の背景色明る空色変更する方法コード例次に示します

<%@ Page Language="VB" %>

<html>

  <!-- For the hover styles of the Menu
 control to  -->
  <!-- work correctly, you must include this head   -->
  <!-- element.                                     -->
  <head runat="server">
  </head>

  <body>
    <form runat="server">
    
      <h3>Menu DynamicHoverStyle Example</h3>
    
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        target="_blank"  
        runat="server">
        
        <dynamichoverstyle backcolor="LightSkyBlue"
          forecolor="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>

  <!-- For the hover styles of the Menu control to  -->
  <!-- work correctly, you must include this head   -->
  <!-- element.                                     -->
  <head runat="server">
  </head>

  <body>
    <form runat="server">
    
      <h3>Menu DynamicHoverStyle Example</h3>
    
      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        target="_blank"  
        runat="server">
        
        <dynamichoverstyle backcolor="LightSkyBlue"
          forecolor="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 名前空間
DynamicMenuItemStyle
DynamicMenuStyle
DynamicSelectedStyle
LevelMenuItemStyles
LevelSelectedStyles
LevelSubMenuStyles
StaticHoverStyle
StaticMenuItemStyle
StaticMenuStyle
StaticSelectedStyle


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

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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2025 GRAS Group, Inc.RSS