Today we tackle another new feature in 1.3: ScrollTo.
This allows us to scroll to the beginning of a ListView or to the end or to a particular entry. Let’s return to the grouping code we created here. We’re going to make some minor changes to illustrate ScrollTo
To illustrate how this works, let’s add a button to the XAML which will trigger the scrolling,
|
<Button Text=“Last Item” Clicked=“GoToLastItem” />
|
The event handler is identified as GoToLastItem. We’ll implement that in our code behind,
|
public void GoToLastItem ( object obj, EventArgs e ) {
var target = Employees[ Employees.Count – 1 ];
EmployeeListView.ScrollTo( target, ScrollToPosition.Start, true );
}
|
Continued here