Partager via


XmlMappedRange.VerticalAlignment, propriété

Obtient ou définit l'alignement vertical 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 VerticalAlignment As Object
Object VerticalAlignment { get; set; }

Valeur de propriété

Type : System.Object
Alignement vertical du contrôle XmlMappedRange.

Notes

L'alignement vertical retourné peut avoir l'une des valeurs suivantes :

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