Table.HorizontalAlign 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 o alinhamento horizontal do Table controlo na página.
public:
virtual property System::Web::UI::WebControls::HorizontalAlign HorizontalAlign { System::Web::UI::WebControls::HorizontalAlign get(); void set(System::Web::UI::WebControls::HorizontalAlign value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
Public Overridable Property HorizontalAlign As HorizontalAlign
Valor de Propriedade
Um dos HorizontalAlign valores de enumeração. O valor predefinido é NotSet.
- Atributos
Exemplos
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
<title>Table - C# Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Table - C# Example</h3>
<asp:Table id="Table1" runat="server"
GridLines="Both" BackImageUrl="image1.gif"
HorizontalAlign="Center" CellSpacing="3"
CellPadding="3">
<asp:TableRow>
<asp:TableCell>Row 0, Col 0</asp:TableCell>
<asp:TableCell>Row 0, Col 1</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>Row 1, Col 0</asp:TableCell>
<asp:TableCell>Row 1, Col 1</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
<title>Table - VB.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Table - C# Example</h3>
<asp:Table id="Table1" runat="server"
GridLines="Both" BackImageUrl="image1.gif"
HorizontalAlign="Center" CellSpacing="3"
CellPadding="3">
<asp:TableRow>
<asp:TableCell>Row 0, Col 0</asp:TableCell>
<asp:TableCell>Row 0, Col 1</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>Row 1, Col 0</asp:TableCell>
<asp:TableCell>Row 1, Col 1</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
Observações
Use a HorizontalAlign propriedade para especificar o alinhamento horizontal do Table controlo dentro da página. A tabela seguinte lista os diferentes estilos de alinhamento horizontal.
| Valor HorizontalAlign | Descrição |
|---|---|
NotSet |
O alinhamento horizontal do Table controlo não foi definido. |
Left |
O Table controlo fica justificado na página. |
Center |
O Table controlo está centrado na página. |
Right |
O Table controlo é justificado corretamente na página. |
Justify |
O Table controlo está alinhado com as margens esquerda e direita da página. |