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
Object HorizontalAlignment { get; set; }
Valeur de propriété
Type : System.Object
Une des valeurs de XlHAlign.
Notes
Certaines des constantes d' XlHAlign peuvent ne pas être disponibles pour vous, selon la prise en charge linguistique (Anglais.. américain, par exemple) que vous avez sélectionné ou installé.
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
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, consultez Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.