using System; using System.Linq; using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Input; using Avalonia.Layout; using Avalonia.Markup.Xaml; using Avalonia.VisualTree; using ControlCatalog.ViewModels; namespace ControlCatalog.Pages { public class ItemsRepeaterPage : UserControl { private readonly ItemsRepeaterPageViewModel _viewModel; private ItemsRepeater _repeater; private ScrollViewer _scroller; private int _selectedIndex; private Button _scrollToLast; private Button _scrollToRandom; private Button _scrollToSelected; private Random _random = new Random(0); public ItemsRepeaterPage() { this.InitializeComponent(); _repeater = this.Get("repeater"); _scroller = this.Get("scroller"); _scrollToLast = this.Get