PanelStyle.Direction Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém ou define a direção para mostrar os controlos que incluem texto num controlo de painel.
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
Valor de Propriedade
Um dos ContentDirection valores. A predefinição é NotSet.
Exceções
A direção não é um dos valores ContentDirection .
Exemplos
O exemplo de código seguinte define as Direction propriedades de dois controlos de painel, Panel1 e Panel2, para o ContentDirection.LeftToRight valor de enumeração. Este exemplo de código faz parte de um exemplo maior fornecido para a PanelStyle classe.
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
Observações
A Direction propriedade especifica a direção para mostrar os controlos que incluem texto num controlo de painel.
A Direction propriedade é definida usando um dos ContentDirection valores. A tabela seguinte lista os valores possíveis.
| Value | Descrição |
|---|---|
NotSet |
A direção do conteúdo não está definida. |
LeftToRight |
Controlos filhos que incluem texto são exibidos da esquerda para a direita. |
RightToLeft |
Os controlos filhos que incluem texto são apresentados da direita para a esquerda. |
Se especificar LeftToRight, controlos filhos que incluem a exibição de texto da esquerda para a direita. Se especificar RightToLeft, controlos filhos que incluem texto exibido da direita para a esquerda. Utiliza-se RightToLeft para mostrar texto de línguas que são escritas da direita para a esquerda, como árabe ou hebraico.