Spread Silverlight Documentation
VerticalPosition Enumeration
Example Example 


Specifies the vertical position of the cell or column in the component.
Syntax
'Declaration
 
Public Enum VerticalPosition 
   Inherits System.Enum
'Usage
 
Dim instance As VerticalPosition
public enum VerticalPosition : System.Enum 
Members
MemberDescription
BottomPositions the cell or column at the bottom.
CenterPositions the cell or column in the center.
NearestPositions the cell or column to the nearest edge.
TopPositions the cell or column at the top.
Example
This example sets the VerticalPosition enumeration.
private void Window_Loaded(object sender, RoutedEventArgs e)
        {
var style = new System.Windows.Style();
gcSpreadSheet1.HorizontalScrollBarStyle = style;
gcSpreadSheet1.VerticalScrollBarStyle = style;
gcSpreadSheet1.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible;
gcSpreadSheet1.VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible;
gcSpreadSheet1.HorizontalScrollBarHeight = 20;
gcSpreadSheet1.VerticalScrollBarWidth = 20;
gcSpreadSheet1.ScrollBarTrackPolicy = GrapeCity.Windows.SpreadSheet.UI.ScrollBarTrackPolicy.Both;
gcSpreadSheet1.Invalidate();            
        }

private void button1_Click(object sender, RoutedEventArgs e)
        {
//Uncomment a method to test
//gcSpreadSheet1.Sheets[0].SetActiveCell(10, 7);
//gcSpreadSheet1.ShowActiveCell(GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Bottom, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Left);
//gcSpreadSheet1.ShowCell(0, 0, 20, 10, GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Bottom, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Right);
//gcSpreadSheet1.ShowColumn(0, 10, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Nearest);
gcSpreadSheet1.ShowRow(0, 50, GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Center);
gcSpreadSheet1.Invalidate();           
        }
Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
         Dim style As New System.Windows.Style()
        GcSpreadSheet1.HorizontalScrollBarStyle = style
        GcSpreadSheet1.VerticalScrollBarStyle = style
        GcSpreadSheet1.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible
        GcSpreadSheet1.VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Visible
        GcSpreadSheet1.HorizontalScrollBarHeight = 20
        GcSpreadSheet1.VerticalScrollBarWidth = 20
        GcSpreadSheet1.ScrollBarTrackPolicy = GrapeCity.Windows.SpreadSheet.UI.ScrollBarTrackPolicy.Both
        GcSpreadSheet1.Invalidate()
End Sub

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        'Uncomment a method to test
        'GcSpreadSheet1.Sheets(0).SetActiveCell(10, 7)
        'GcSpreadSheet1.ShowActiveCell(GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Bottom, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Left)
        'GcSpreadSheet1.ShowCell(0, 0, 20, 10, GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Bottom, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Right)
        'GcSpreadSheet1.ShowColumn(0, 10, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Nearest)
        GcSpreadSheet1.ShowRow(0, 50, GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Center)
        GcSpreadSheet1.Invalidate()
End Sub
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.UI.VerticalPosition

Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GrapeCity.Windows.SpreadSheet.UI Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.