예제 #1
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var scrollViewer = GridView1.GetFirstDescendantOfType <ScrollViewer>();

            int s = (int)scrollViewer.HorizontalOffset;

            for (int i = s; i > s - 220; i = i - 10)
            {
                await Task.Delay(2);

                scrollViewer.ScrollToHorizontalOffset(i);
            }
        }
        private async void Button_Click_1(object sender, RoutedEventArgs e)
        {
            var scrollViewer = GridView1.GetFirstDescendantOfType <ScrollViewer>();

            int s = (int)scrollViewer.HorizontalOffset;

            for (int i = s; i < s + 216; i = i + 2)
            {
                if (i % 5 == 0)
                {
                    await Task.Delay(1);
                }
                scrollViewer.ScrollToHorizontalOffset(i);
            }
        }
예제 #3
0
        private async void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Storyboard b = (Storyboard)FindName("NavigationControlInOut");

            b.Begin();

            var scrollViewer = GridView1.GetFirstDescendantOfType <ScrollViewer>();

            int s = (int)scrollViewer.HorizontalOffset;

            for (int i = s; i < s + 216; i = i + 2)
            {
                if (i % 5 == 0)
                {
                    await Task.Delay(1);
                }
                scrollViewer.ScrollToHorizontalOffset(i);
            }
        }