Beispiel #1
0
        private async Task HandleScrollEvent(KeyCode keyCode)
        {
            Task <bool> ScrollTask()
            {
                if (keyCode == KeyCode.Next)
                {
                    return(ContentListView.ScrollToNext());
                }
                if (keyCode == KeyCode.Previous)
                {
                    return(ContentListView.ScrollToPrevious());
                }
                throw new ArgumentOutOfRangeException(nameof(keyCode), keyCode, null);
            }

            var listScrolled = await ScrollTask();

            if (listScrolled)
            {
                await UpdateContentInfo();
            }
        }