Menu.StaticEnableDefaultPopOutImage プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
静的メニュー項目にサブメニューがあることを示す組み込みイメージを表示するかどうかを示す値を取得または設定します。
public:
property bool StaticEnableDefaultPopOutImage { bool get(); void set(bool value); };
public bool StaticEnableDefaultPopOutImage { get; set; }
member this.StaticEnableDefaultPopOutImage : bool with get, set
Public Property StaticEnableDefaultPopOutImage As Boolean
プロパティ値
true サブメニューを含む静的メニュー項目の組み込みイメージを表示する場合。それ以外の場合は false。 既定値は、true です。
例
次のコード例では、 StaticEnableDefaultPopOutImage プロパティを使用して、静的メニュー項目にサブメニューがあることを示すイメージを非表示にする方法を示します。 イメージを非表示にするには、 StaticPopOutImageUrl プロパティも空の文字列 ("") に設定する必要があります。
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Menu StaticEnableDefaultPopOutImage Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu StaticEnableDefaultPopOutImage Example</h3>
<asp:menu id="NavigationMenu"
staticenabledefaultpopoutimage="false"
dynamichorizontaloffset="10"
staticdisplaylevels="1"
orientation="Vertical"
runat="server">
<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="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Menu StaticEnableDefaultPopOutImage Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu StaticEnableDefaultPopOutImage Example</h3>
<asp:menu id="NavigationMenu"
staticenabledefaultpopoutimage="false"
dynamichorizontaloffset="10"
staticdisplaylevels="1"
orientation="Vertical"
runat="server">
<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>
注釈
静的メニュー項目にサブメニューが含まれている場合、ユーザーがメニューを展開できることを示す画像を表示できます。 この画像を表示するには、次の 2 つの方法があります。
StaticEnableDefaultPopOutImage プロパティを、組み込みイメージ (既定) を使用するように
trueに設定します。カスタム イメージを指定するには、 StaticPopOutImageUrl プロパティを設定します。
StaticPopOutImageUrl プロパティが設定されている場合、そのイメージは、StaticEnableDefaultPopOutImage プロパティの値に関係なく、組み込みのイメージをオーバーライドします。
注
StaticPopOutImageUrl プロパティが設定されておらず、StaticEnableDefaultPopOutImage プロパティが false に設定されている場合、イメージは表示されません。
StaticPopOutImageTextFormatString プロパティを設定すると、画像の代替テキストを指定できます。