コード例 #1
0
        private void ListViewChangeViewArbitrary_Loaded(object sender, RoutedEventArgs e)
        {
            //Workaround for bug on Android that TargetListView's template is not materialized yet when Loaded gets called
            TargetListView.ApplyTemplate();

            var scrollViewer = TargetListView.FindFirstChild <Windows.UI.Xaml.Controls.ScrollViewer>();

            scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
        }
コード例 #2
0
        private void ApplyOffsetDefault(object sender, RoutedEventArgs e)
        {
            var   scrollViewer = TargetListView.FindFirstChild <Windows.UI.Xaml.Controls.ScrollViewer>();
            float offset;

            if (float.TryParse(OffsetTextBox.Text, out offset))
            {
                scrollViewer.ChangeView(null, offset, null);
            }
        }
コード例 #3
0
        private void ApplyOffsetChooseAnimate(object sender, RoutedEventArgs e)
        {
            var   scrollViewer = TargetListView.FindFirstChild <Windows.UI.Xaml.Controls.ScrollViewer>();
            float offset;

            if (float.TryParse(OffsetTextBox.Text, out offset))
            {
                var disableAnimation = DisableAnimationCheckBox.IsChecked;
                scrollViewer.ChangeView(null, offset, null, disableAnimation ?? false);
            }
        }