You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
555 B
23 lines
555 B
using MAUICollectionViewTest.Models;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace MAUICollectionViewTest.Views;
|
|
|
|
public partial class PlayerView : ContentPage
|
|
{
|
|
public PlayerView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void LastButton_Clicked(object sender, EventArgs e)
|
|
{
|
|
if (mainCollectionView.ItemsSource is ObservableCollection<Player> players)
|
|
mainCollectionView.ScrollTo(players.Count - 1);
|
|
}
|
|
|
|
private void TopButton_Clicked(object sender, EventArgs e)
|
|
{
|
|
mainCollectionView.ScrollTo(0);
|
|
}
|
|
} |