PanelStyle.Direction Özellik

Tanım

Panel denetiminde metin içeren denetimlerin görüntüleneceği yönü alır veya ayarlar.

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

Özellik Değeri

ContentDirection

Değerlerden ContentDirection biri. Varsayılan değer: NotSet.

Özel durumlar

Yön değerlerden ContentDirection biri değildir.

Örnekler

Aşağıdaki kod örneği, Panel1 ve Panel2olmak üzere iki panel denetiminin ContentDirection.LeftToRight özelliklerini numaralandırma değerine ayarlarDirection. Bu kod örneği, sınıfı için PanelStyle sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

özelliği, Direction panel denetiminde metin içeren denetimlerin görüntüleneceği yönü belirtir.

Direction özelliği değerlerden ContentDirection biri kullanılarak ayarlanır. Aşağıdaki tabloda olası değerler listelemektedir.

Değer Açıklama
NotSet İçerik yönü ayarlanmadı.
LeftToRight Metin içeren alt denetimler soldan sağa görüntülenir.
RightToLeft Metin içeren alt denetimler sağdan sola görüntülenir.

belirtirseniz LeftToRight, metin içeren alt denetimler soldan sağa görüntülenir. belirtirseniz RightToLeft, metin içeren alt denetimler sağdan sola görüntülenir. Arapça veya İbranice gibi sağdan sola yazılan dillerin metnini görüntülemek için kullanın RightToLeft .

Şunlara uygulanır

Ayrıca bkz.