PanelStyle.Direction 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
패널 컨트롤에 텍스트를 포함하는 컨트롤을 표시할 방향을 가져오거나 설정합니다.
public:
virtual property System::Web::UI::WebControls::ContentDirection Direction { System::Web::UI::WebControls::ContentDirection get(); void set(System::Web::UI::WebControls::ContentDirection value); };
public virtual System.Web.UI.WebControls.ContentDirection Direction { get; set; }
member this.Direction : System.Web.UI.WebControls.ContentDirection with get, set
Public Overridable Property Direction As ContentDirection
속성 값
값 중 ContentDirection 하나입니다. 기본값은 NotSet입니다.
예외
방향은 값 중 ContentDirection 하나가 아닙니다.
예제
다음 코드 예제에서는 두 패널 컨트롤 Panel1Panel2의 속성을 열거형 값으로 ContentDirection.LeftToRight 설정합니다Direction. 이 코드 예제는 클래스에 제공된 더 큰 예제의 PanelStyle 일부입니다.
public partial class PanelStylecs_aspx : Page
{
void Page_Load(object sender, EventArgs e)
{
StateBag panelState = new StateBag();
PanelStyle myPanelStyle = new PanelStyle(panelState);
// Set the properties of the PanelStyle class.
myPanelStyle.HorizontalAlign = HorizontalAlign.Center;
myPanelStyle.ScrollBars = ScrollBars.Both;
myPanelStyle.Wrap = false;
myPanelStyle.Direction = ContentDirection.LeftToRight;
myPanelStyle.BackImageUrl = @"~\images\picture.jpg";
// Use the ApplyStyle method of the Panel control to apply
// the settings from the myPanelStyle object.
Panel1.ApplyStyle(myPanelStyle);
Panel2.ApplyStyle(myPanelStyle);
}
}
Partial Class PanelStylevb_aspx
Inherits Page
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim panelState As StateBag = New StateBag()
Dim myPanelStyle As PanelStyle = New PanelStyle(panelState)
' Set the properties of the PanelStyle class.
myPanelStyle.HorizontalAlign = HorizontalAlign.Center
myPanelStyle.ScrollBars = ScrollBars.Both
myPanelStyle.Wrap = False
myPanelStyle.Direction = ContentDirection.LeftToRight
myPanelStyle.BackImageUrl = "~\images\picture.jpg"
' Use the ApplyStyle method of the Panel control to apply
' the settings from the myPanelStyle object.
Panel1.ApplyStyle(myPanelStyle)
Panel2.ApplyStyle(myPanelStyle)
End Sub
End Class
설명
이 속성은 Direction 패널 컨트롤에 텍스트를 포함하는 컨트롤을 표시할 방향을 지정합니다.
속성은 Direction 값 중 하나를 사용하여 설정됩니다 ContentDirection . 다음 표에서는 가능한 값을 나열합니다.
| 가치 | 설명 |
|---|---|
NotSet |
콘텐츠 방향이 설정되지 않았습니다. |
LeftToRight |
텍스트를 포함하는 자식 컨트롤은 왼쪽에서 오른쪽으로 표시됩니다. |
RightToLeft |
텍스트를 포함하는 자식 컨트롤이 오른쪽에서 왼쪽으로 표시됩니다. |
지정 LeftToRight하는 경우 왼쪽에서 오른쪽으로 텍스트를 표시하는 자식 컨트롤입니다. 지정 RightToLeft하는 경우 텍스트를 포함하는 자식 컨트롤이 오른쪽에서 왼쪽으로 표시됩니다. 아랍어 또는 히브리어와 같이 오른쪽에서 왼쪽으로 쓰는 언어의 텍스트를 표시하는 데 사용합니다 RightToLeft .