FlexGrid for WinRT
KeepCurrentVisible Property
Example 

Gets or sets a value that indicates whether the grid should automatically scroll to keep the current item visible.
Syntax
'Declaration
 
Public Property KeepCurrentVisible As System.Boolean
public System.bool KeepCurrentVisible {get; set;}
Remarks

This property applies only to bound mode. If KeepCurrentVisible is set to true, then the grid will automatically scroll to show the item that is selected in the Windows.UI.Xaml.Data.ICollectionView being used as an items source. The current selection may be set in code, or by selecting an item in another control that is bound to the same data source.

Example
The code below causes the grid to automatically scroll to show the current item whenever the "Top" or "Bottom" buttons are clicked:
public MainPage()
{
  InitializeComponent();
  _flex..KeepCurrentVisible = true;
}
            
void Top_Click(object sender, RoutedEventArgs e)
{
  _flex.CollectionView.MoveCurrentToFirst();
}
void Bottom_Click(object sender, RoutedEventArgs e)
{
  _flex.CollectionView.MoveCurrentToLast();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGrid Class
C1FlexGrid Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum  |   Documentation Feedback