.NET Framework Class Library TableRow..::.HorizontalAlign Property Gets or sets the horizontal alignment of the contents in the row.
Namespace:
System.Web.UI.WebControls
Assembly:
System.Web (in System.Web.dll)

Syntax
Public Overridable Property HorizontalAlign As HorizontalAlign
Get
Set
public virtual HorizontalAlign HorizontalAlign { get; set; }
public:
virtual property HorizontalAlign HorizontalAlign {
HorizontalAlign get ();
void set (HorizontalAlign value);
}
abstract HorizontalAlign : HorizontalAlign with get, set
override HorizontalAlign : HorizontalAlign with get, set
<asp:TableRow HorizontalAlign="HorizontalAlign" />

Remarks
Use the HorizontalAlign property to specify the horizontal alignment of the contents of the row. The following table lists the possible values. Horizontal Alignment | Description |
|---|
NotSet | The horizontal alignment is not set. |
Left | The contents of the row are left justified. |
Center | The contents of the row are centered. |
Right | The contents of the row are right justified. |
Justify | The contents of the row are uniformly spread out and aligned with both the left and right margins. |

Examples
The following example demonstrates how to use the HorizontalAlign property. For a complete, working code example, see the TableRow class overview topic.
' Create a TableItemStyle object that can be
' set as the default style for all cells
' in the table.
Dim tableStyle As New TableItemStyle()
tableStyle.HorizontalAlign = HorizontalAlign.Center
tableStyle.VerticalAlign = VerticalAlign.Middle
tableStyle.Width = Unit.Pixel(100)
// Create a TableItemStyle object that can be
// set as the default style for all cells
// in the table.
TableItemStyle tableStyle = new TableItemStyle();
tableStyle.HorizontalAlign = HorizontalAlign.Center;
tableStyle.VerticalAlign = VerticalAlign.Middle;
tableStyle.Width = Unit.Pixel(100);

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Bibliothèque de classes .NET Framework TableRow..::.HorizontalAlign, propriété Obtient ou définit l'alignement horizontal du contenu de la ligne.
Espace de noms :
System.Web.UI.WebControls
Assembly :
System.Web (dans System.Web.dll)

Syntaxe
Public Overridable Property HorizontalAlign As HorizontalAlign
Get
Set
public virtual HorizontalAlign HorizontalAlign { get; set; }
public:
virtual property HorizontalAlign HorizontalAlign {
HorizontalAlign get ();
void set (HorizontalAlign value);
}
abstract HorizontalAlign : HorizontalAlign with get, set
override HorizontalAlign : HorizontalAlign with get, set
<asp:TableRow HorizontalAlign="HorizontalAlign" />

Notes
Utilisez la propriété HorizontalAlign pour spécifier l'alignement horizontal du contenu de la ligne. Le tableau suivant énumère les valeurs possibles. Alignement horizontal | Description |
|---|
NotSet | L'alignement horizontal n'est pas défini. |
Left | Le contenu de la ligne est aligné à gauche. |
Center | Le contenu de la ligne est centré. |
Right | Le contenu de la ligne est aligné à droite. |
Justify | Le contenu de la ligne est réparti uniformément et aligné avec les marges gauche et droite. |

Exemples
L'exemple suivant montre comment utiliser la propriété HorizontalAlign. Pour obtenir un exemple complet, consultez la rubrique de vue d'ensemble de la classe TableRow.
' Create a TableItemStyle object that can be
' set as the default style for all cells
' in the table.
Dim tableStyle As New TableItemStyle()
tableStyle.HorizontalAlign = HorizontalAlign.Center
tableStyle.VerticalAlign = VerticalAlign.Middle
tableStyle.Width = Unit.Pixel(100)
// Create a TableItemStyle object that can be
// set as the default style for all cells
// in the table.
TableItemStyle tableStyle = new TableItemStyle();
tableStyle.HorizontalAlign = HorizontalAlign.Center;
tableStyle.VerticalAlign = VerticalAlign.Middle;
tableStyle.Width = Unit.Pixel(100);

Informations de version
.NET FrameworkPris en charge dans : 4, 3.5, 3.0, 2.0, 1.1, 1.0

Plateformes
Windows 7, Windows Vista SP1 ou ultérieur, Windows XP SP3, Windows XP SP2 Édition x64, Windows Server 2008 (installation minimale non prise en charge), Windows Server 2008 R2 (installation minimale prise en charge avec SP1 ou version ultérieure), Windows Server 2003 SP2
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Voir aussi
RéférenceAutres ressources
|