Suggérer une traduction
 
Suggestions d'autres utilisateurs :

progress indicator
Aucune autre suggestion.
Cliquez pour évaluer et commenter
MSDN
MSDN Library
Développement .NET
.NET Framework 4
Espaces de noms System.Web
System.Web.UI.WebControls
TableRow, classe
Propriétés TableRow
 HorizontalAlign, propriété
Réduire tout/Développer tout Réduire tout
Affichage du contenu :  côte à côteAffichage du contenu : côte à côte
.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)
Visual Basic
Public Overridable Property HorizontalAlign As HorizontalAlign
    Get
    Set
C#
public virtual HorizontalAlign HorizontalAlign { get; set; }
Visual C++
public:
virtual property HorizontalAlign HorizontalAlign {
    HorizontalAlign get ();
    void set (HorizontalAlign value);
}
F#
abstract HorizontalAlign : HorizontalAlign with get, set
override HorizontalAlign : HorizontalAlign with get, set
ASP.NET
<asp:TableRow HorizontalAlign="HorizontalAlign" />

Property Value

Type: System.Web.UI.WebControls..::.HorizontalAlign
One of the HorizontalAlign values. The default value is NotSet.

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.

The following example demonstrates how to use the HorizontalAlign property. For a complete, working code example, see the TableRow class overview topic.

Visual Basic
' 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)
C#
// 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);

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

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.
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)
Visual Basic
Public Overridable Property HorizontalAlign As HorizontalAlign
    Get
    Set
C#
public virtual HorizontalAlign HorizontalAlign { get; set; }
VisualC++
public:
virtual property HorizontalAlign HorizontalAlign {
    HorizontalAlign get ();
    void set (HorizontalAlign value);
}
F#
abstract HorizontalAlign : HorizontalAlign with get, set
override HorizontalAlign : HorizontalAlign with get, set
ASP.NET
<asp:TableRow HorizontalAlign="HorizontalAlign" />

Valeur de propriété

Type : System.Web.UI.WebControls..::.HorizontalAlign
Une des valeurs de HorizontalAlign. La valeur par défaut est NotSet.

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.

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.

Visual Basic
' 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)
C#
// 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);

.NET Framework

Pris en charge dans : 4, 3.5, 3.0, 2.0, 1.1, 1.0

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.
Contenu de la communauté   Qu'est-ce que le Contenu de la communauté ?
Ajouter du contenu RSS  Annotations
Processing
© 2012 Microsoft. Tous droits réservés. Conditions d'utilisation | Marques | Confidentialité
Page view tracker