void UpdateSelection(int index) { if (Context.SelectedIndex == index) { return; } var direction = scroller.GetMovementDirection(Context.SelectedIndex, index); Context.SelectedIndex = index; Refresh(); onSelectionChanged?.Invoke(index, direction); }