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; }
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); } }
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); } }