Spread Silverlight Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / Column Class / VerticalAlignment Property
Example


In This Topic
    VerticalAlignment Property (Column)
    In This Topic
    Gets or sets the vertical alignment of the column contents.
    Syntax
    'Declaration
     
    <DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)>
    Public Property VerticalAlignment As CellVerticalAlignment
    'Usage
     
    Dim instance As Column
    Dim value As CellVerticalAlignment
     
    instance.VerticalAlignment = value
     
    value = instance.VerticalAlignment
    [DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    public CellVerticalAlignment VerticalAlignment {get; set;}

    Property Value

    A CellVerticalAlignment object that specifies the vertical alignment for the column. The default value is General.
    Example
    This example uses the VerticalAlignment property.
    GcSpreadSheet1.ActiveSheet.Columns[0].Width = 50;
    GcSpreadSheet1.ActiveSheet.Columns[0].VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Bottom;
    GcSpreadSheet1.ActiveSheet.Columns[0].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right;
    GcSpreadSheet1.ActiveSheet.Rows[3].Height = 80;
    GcSpreadSheet1.ActiveSheet.Rows[3].HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center;
    GcSpreadSheet1.ActiveSheet.Rows[3].VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Top;
    
    private void button1_Click(object sender, RoutedEventArgs e)
    {
            GcSpreadSheet1.ActiveSheet.Columns[0].ResetWidth();
            GcSpreadSheet1.ActiveSheet.Columns[0].ResetVerticalAlignment();
            GcSpreadSheet1.ActiveSheet.Columns[0].ResetHorizontalAlignment();
            GcSpreadSheet1.ActiveSheet.Rows[3].ResetHeight();
            GcSpreadSheet1.ActiveSheet.Rows[3].ResetHorizontalAlignment();
            GcSpreadSheet1.ActiveSheet.Rows[3].ResetVerticalAlignment();
    }
    GcSpreadSheet1.ActiveSheet.Columns(0).Width = 50
    GcSpreadSheet1.ActiveSheet.Columns(0).VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Bottom
    GcSpreadSheet1.ActiveSheet.Columns(0).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right
    GcSpreadSheet1.ActiveSheet.Rows(3).Height = 80
    GcSpreadSheet1.ActiveSheet.Rows(3).HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Center
    GcSpreadSheet1.ActiveSheet.Rows(3).VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Top
    
    
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
            GcSpreadSheet1.ActiveSheet.Columns(0).ResetWidth()
            GcSpreadSheet1.ActiveSheet.Columns(0).ResetVerticalAlignment()
            GcSpreadSheet1.ActiveSheet.Columns(0).ResetHorizontalAlignment()
            GcSpreadSheet1.ActiveSheet.Rows(3).ResetHeight()
            GcSpreadSheet1.ActiveSheet.Rows(3).ResetHorizontalAlignment()
            GcSpreadSheet1.ActiveSheet.Rows(3).ResetVerticalAlignment()
        End Sub
    See Also