Menu.DisappearAfter プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As Menu Dim value As Integer value = instance.DisappearAfter instance.DisappearAfter = value
[ThemeableAttribute(false)] public: property int DisappearAfter { int get (); void set (int value); }
/** @property */ public int get_DisappearAfter () /** @property */ public void set_DisappearAfter (int value)
マウス ポインタがメニューの上から離れた後で動的メニューを表示しておく時間 (ミリ秒単位)。既定値は 500 です。

既定では、マウス ポインタがメニューの上から離れて一定の時間が経過すると、動的メニューは自動的に非表示になります。この時間を指定するには、DisappearAfter プロパティを使用します。
![]() |
---|
このプロパティを -1 に設定して、動的メニューが自動的に非表示にならないように指定することもできます。この場合、動的メニュー項目はユーザーがメニューの外側をクリックした場合にのみ非表示になります。
このプロパティを、テーマまたはスタイル シート テーマを使用して設定することはできません。詳細については、ThemeableAttribute、ASP.NET のテーマとスキンの概要 の各トピックを参照してください。

DisappearAfter プロパティを使用し、ユーザーがマウス ポインタをメニューから移動して 2 秒以上経過した後で動的メニューを非表示にするように指定する方法のコード例を次に示します。
<%@ Page Language="VB" %> <html> <body> <form runat="server"> <h3>Menu DisappearAfter Example</h3> <!-- Use the DisappearAfter property to --> <!-- hide the dynamic menu items if the --> <!-- user moves the mouse pointer away --> <!-- from the menu for two seconds. --> <asp:menu id="NavigationMenu" disappearafter="2000" staticdisplaylevels="1" orientation="Vertical" runat="server"> <items> <asp:menuitem navigateurl="~\Home.aspx" text="Home"/> <asp:menuitem navigateurl="~\Music.aspx" text="Music"> <asp:menuitem navigateurl="~\Classical.aspx" text="Classical"/> <asp:menuitem navigateurl="~\Rock.aspx" text="Rock"/> <asp:menuitem navigateurl="~\Jazz.aspx" text="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="~\Movies.aspx" text="Movies"> <asp:menuitem navigateurl="~\Action.aspx" text="Action"/> <asp:menuitem navigateurl="~\Drama.aspx" text="Drama"/> <asp:menuitem navigateurl="~\SciFi.aspx" text="Science Fiction"/> </asp:menuitem> </items> </asp:menu> </form> </body> </html>
<%@ Page Language="C#" %> <html> <body> <form runat="server"> <h3>Menu DisappearAfter Example</h3> <!-- Use the DisappearAfter property to --> <!-- hide the dynamic menu items if the --> <!-- user moves the mouse pointer away --> <!-- from the menu for two seconds. --> <asp:menu id="NavigationMenu" disappearafter="2000" staticdisplaylevels="1" orientation="Vertical" runat="server"> <items> <asp:menuitem navigateurl="~\Home.aspx" text="Home"/> <asp:menuitem navigateurl="~\Music.aspx" text="Music"> <asp:menuitem navigateurl="~\Classical.aspx" text="Classical"/> <asp:menuitem navigateurl="~\Rock.aspx" text="Rock"/> <asp:menuitem navigateurl="~\Jazz.aspx" text="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="~\Movies.aspx" text="Movies"> <asp:menuitem navigateurl="~\Action.aspx" text="Action"/> <asp:menuitem navigateurl="~\Drama.aspx" text="Drama"/> <asp:menuitem navigateurl="~\SciFi.aspx" text="Science Fiction"/> </asp:menuitem> </items> </asp:menu> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMenu.DisappearAfter プロパティを検索する場合は、下記のリンクをクリックしてください。

- Menu.DisappearAfter プロパティのページへのリンク