Freigeben über


XmlMappedRange.VerticalAlignment Property

Definition

Gets or sets the vertical alignment of the XmlMappedRange control.

public:
 property System::Object ^ VerticalAlignment { System::Object ^ get(); void set(System::Object ^ value); };
public object VerticalAlignment { get; set; }
member this.VerticalAlignment : obj with get, set
Public Property VerticalAlignment As Object

Property Value

The vertical alignment of the XmlMappedRange control.

Examples

The following code example uses the HorizontalAlignment and VerticalAlignment properties to align the contents of XmlMappedRange to the bottom right. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

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;
}
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

Remarks

The returned vertical alignment can be one of the following values:

Applies to