Menu.StaticSubMenuIndent 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
정적 메뉴 내의 하위 메뉴 들여쓰기 간격(픽셀)을 가져오거나 설정합니다.
public:
property System::Web::UI::WebControls::Unit StaticSubMenuIndent { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };
[System.Web.UI.Themeable(true)]
public System.Web.UI.WebControls.Unit StaticSubMenuIndent { get; set; }
[<System.Web.UI.Themeable(true)>]
member this.StaticSubMenuIndent : System.Web.UI.WebControls.Unit with get, set
Public Property StaticSubMenuIndent As Unit
속성 값
Unit 정적 메뉴 내의 하위 메뉴 들여쓰기 간격(픽셀)을 나타내는 A입니다. 기본값은 0입니다.
- 특성
예외
선택한 Unit 값이 0보다 작습니다.
예제
다음 코드 예제에서는 정적 메뉴의 StaticSubMenuIndent 하위 메뉴 항목을 10 픽셀 들여쓰기 하는 속성을 사용 하는 방법을 보여 줍니다.
<%@ 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 StaticSubMenuIndent Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu StaticSubMenuIndent Example</h3>
<asp:menu id="NavigationMenu"
staticdisplaylevels="2"
staticsubmenuindent="10"
orientation="Vertical"
runat="server">
<items>
<asp:menuitem text="Home"
tooltip="Home">
<asp:menuitem text="Music"
tooltip="Music">
<asp:menuitem text="Classical"
tooltip="Classical"/>
<asp:menuitem text="Rock"
tooltip="Rock"/>
<asp:menuitem text="Jazz"
tooltip="Jazz"/>
</asp:menuitem>
<asp:menuitem text="Movies"
tooltip="Movies">
<asp:menuitem text="Action"
tooltip="Action"/>
<asp:menuitem text="Drama"
tooltip="Drama"/>
<asp:menuitem 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 StaticSubMenuIndent Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu StaticSubMenuIndent Example</h3>
<asp:menu id="NavigationMenu"
staticdisplaylevels="2"
staticsubmenuindent="10"
orientation="Vertical"
runat="server">
<items>
<asp:menuitem text="Home"
tooltip="Home">
<asp:menuitem text="Music"
tooltip="Music">
<asp:menuitem text="Classical"
tooltip="Classical"/>
<asp:menuitem text="Rock"
tooltip="Rock"/>
<asp:menuitem text="Jazz"
tooltip="Jazz"/>
</asp:menuitem>
<asp:menuitem text="Movies"
tooltip="Movies">
<asp:menuitem text="Action"
tooltip="Action"/>
<asp:menuitem text="Drama"
tooltip="Drama"/>
<asp:menuitem text="Musical"
tooltip="Musical"/>
</asp:menuitem>
</asp:menuitem>
</items>
</asp:menu>
</form>
</body>
</html>
설명
정적 메뉴가 둘 이상의 메뉴 수준을 표시하는 경우(속성이 1보다 큰 값으로 설정된 경우 StaticDisplayLevels ) 이 속성을 사용하여 StaticSubMenuIndent 정적 메뉴 내의 하위 메뉴 항목을 들여쓰는 픽셀 수를 지정합니다.