Пример #1
0
        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;
            }
        }
Пример #2
0
        // 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);
            }
        }
Пример #3
0
        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);
            }
        }