다음을 통해 공유


Menu.StaticEnableDefaultPopOutImage 속성

정의

정적 메뉴 항목에 하위 메뉴가 있음을 나타내기 위해 기본 제공 이미지가 표시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

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>

설명

정적 메뉴 항목에 하위 메뉴가 포함된 경우 사용자가 메뉴를 확장할 수 있음을 나타내는 이미지를 표시할 수 있습니다. 이 이미지를 표시하는 방법에는 두 가지가 있습니다.

속성이 StaticPopOutImageUrl 설정된 경우 해당 이미지는 속성 값에 관계없이 기본 제공 이미지를 재정의 StaticEnableDefaultPopOutImage 합니다.

메모

속성이 StaticPopOutImageUrl 설정되지 않고 속성이 StaticEnableDefaultPopOutImage 설정된 false경우 이미지가 표시되지 않습니다.

속성을 설정 StaticPopOutImageTextFormatString 하여 이미지의 대체 텍스트를 지정할 수 있습니다.

적용 대상

추가 정보