XmlMappedRange.HorizontalAlignment, propriété

Obtient ou définit l'alignement horizontal du contrôle XmlMappedRange.

Espace de noms :  Microsoft.Office.Tools.Excel
Assembly :  Microsoft.Office.Tools.Excel (dans Microsoft.Office.Tools.Excel.dll)

Syntaxe

'Déclaration
Property HorizontalAlignment As Object
    Get
    Set
Object HorizontalAlignment { get; set; }

Valeur de propriété

Type : System.Object
Une des valeurs de XlHAlign.

Notes

Certaines des constantes XlHAlign peuvent ne pas être disponibles, selon la prise en charge linguistique (anglais U.S. anglais des États-Unis, par exemple) que vous avez sélectionnée ou installée.

Exemples

L'exemple de code suivant utilise les propriétés HorizontalAlignment et VerticalAlignment pour aligner le contenu de XmlMappedRange en bas à droite. Cet exemple de code suppose que la feuille de calcul active contient un contrôle XmlMappedRange nommé CustomerLastNameCell.

Private Sub AlignBottomRight()
    Me.CustomerLastNameCell.HorizontalAlignment = _
        Excel.XlHAlign.xlHAlignRight
    Me.CustomerLastNameCell.VerticalAlignment = _
        Excel.XlVAlign.xlVAlignBottom
    Me.CustomerLastNameCell.Value2 = "The contents " & _
        "of this cell are aligned to the bottom right."
    Me.CustomerLastNameCell.RowHeight = 100
    Me.CustomerLastNameCell.ColumnWidth = 75
End Sub
private void AlignBottomRight()
{
    this.CustomerLastNameCell.HorizontalAlignment = 
        Excel.XlHAlign.xlHAlignRight;
    this.CustomerLastNameCell.VerticalAlignment =
        Excel.XlVAlign.xlVAlignBottom;

    this.CustomerLastNameCell.Value2 = "The contents " +
        "of this cell are aligned to the bottom right.";
    this.CustomerLastNameCell.RowHeight = 100;
    this.CustomerLastNameCell.ColumnWidth = 75;
}

Sécurité .NET Framework

Voir aussi

Référence

XmlMappedRange Interface

Microsoft.Office.Tools.Excel, espace de noms