Orientation 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
복합 컨트롤 내 항목의 일반 레이아웃을 지정합니다.
public enum class Orientation
public enum Orientation
type Orientation =
Public Enum Orientation
- 상속
필드
| Name | 값 | Description |
|---|---|---|
| Horizontal | 0 | 컨트롤의 요소를 수평 방식으로 배치합니다. 대부분의 컨트롤은 컨트롤의 스택이 거의 없는 나란히 표시됩니다. |
| Vertical | 1 | 컨트롤의 요소를 세로 방식으로 배치합니다. 대부분의 컨트롤은 누적되며, 몇 가지 컨트롤이 나란히 표시됩니다. |
예제
다음 코드 예제에서는 컨트롤에 다른 Orientation 열거형 설정을 적용한 결과를 보여 집니다 Login .
<%@ Page Language="C#" AutoEventWireup="False"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void changeOrientation_Click(object sender, EventArgs e)
{
if (Login1.Orientation == Orientation.Vertical)
Login1.Orientation = Orientation.Horizontal;
else
Login1.Orientation = Orientation.Vertical;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<table style="text-align:center; border-width:1">
<tr>
<td>
<asp:Login id="Login1" runat="server" Orientation="Vertical" CreateUserText="Create a new user..."
CreateUserUrl="newUser.aspx" HelpPageText="Help logging in..." HelpPageUrl="help.aspx"
PasswordRecoveryText="Recover your password..." PasswordRecoveryUrl="getPass.aspx"></asp:Login>
</td>
</tr>
<tr>
<td align="center">
<asp:Button id="changeOrientation" Text="Change Orientration" runat="Server" OnClick="changeOrientation_Click"></asp:Button>
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="False"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub changeOrientation_Click(ByVal sender As Object, ByVal e As EventArgs)
If Login1.Orientation = Orientation.Horizontal Then
Login1.Orientation = Orientation.Vertical
Else
Login1.Orientation = Orientation.Horizontal
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<table style="text-align:center; border-width:1">
<tr>
<td>
<asp:Login id="Login1" runat="server" Orientation="Vertical" CreateUserText="Create a new user..."
CreateUserUrl="newUser.aspx" HelpPageText="Help logging in..." HelpPageUrl="help.aspx"
PasswordRecoveryText="Recover your password..." PasswordRecoveryUrl="getPass.aspx"></asp:Login>
</td>
</tr>
<tr>
<td align="center">
<asp:Button id="changeOrientation" Text="Change Orientration" runat="Server" OnClick="changeOrientation_Click"></asp:Button>
</td>
</tr>
</table>
</form>
</body>
</html>