internal void ToggleInertia() { ScrollViewer SV = ContentGrid.Child_0 <ScrollViewer>(1); if (SV != null) { SV.HorizontalSnapPointsType = SnapPointsType.None; SV.VerticalSnapPointsType = SnapPointsType.None; SV.IsScrollInertiaEnabled = Container.UseInertia; } }
// This calls onLoaded private void SetBookAnchor(object sender, RoutedEventArgs e) { SetScrollBar(); ToggleInertia(); ContentGrid.IsSynchronizedWithCurrentItem = false; AccelerSV = ContentGrid.Child_0 <ScrollViewer>(1); // Reader may not be available as ContentGrid.OnLoad is faster then SetTemplate if (!(Reader == null || Reader.SelectedData == null)) { ContentGrid.ScrollIntoView(Reader.SelectedData, ScrollIntoViewAlignment.Leading); } }
internal void ScrollLess(bool IsPage = false) { ScrollViewer SV = ContentGrid.Child_0 <ScrollViewer>(1); double d = 50; if (IsHorz) { if (IsPage) { d = LayoutSettings.ScreenWidth; } SV.ChangeView(SV.HorizontalOffset - d, null, null); } else { if (IsPage) { d = LayoutSettings.ScreenHeight; } SV.ChangeView(null, SV.VerticalOffset - d, null); } }