PanelStyle.Wrap 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
콘텐츠가 패널 내에서 래핑되는지 여부를 나타내는 값을 가져오거나 설정합니다.
public:
virtual property bool Wrap { bool get(); void set(bool value); };
public virtual bool Wrap { get; set; }
member this.Wrap : bool with get, set
Public Overridable Property Wrap As Boolean
속성 값
true콘텐츠가 패널 내에서 래핑되면 이고, 그렇지 않으면 . false 기본값은 true입니다.
예제
다음 코드 예제에서는 두 개의 패널 컨트롤에 대 한 속성을 설정 Wrap 하 고Panel2.falsePanel1 이 코드 예제는 클래스에 제공된 더 큰 예제의 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
설명
이 속성은 Wrap 콘텐츠가 패널 내에서 래핑되는지 여부를 나타냅니다. 속성이 Wrap 설정 false 되고 ScrollBars 속성이 설정 Auto되면 패널의 내용이 패널에 맞는 내용보다 긴 경우 패널의 내용이 가로 스크롤 막대가 있는 한 줄에 표시됩니다. 속성이 Wrap 설정 false 되고 ScrollBars 속성이 설정 None되면 패널이 확장되고 필요한 경우 웹 페이지에 가로 스크롤 막대가 있습니다.