예제 #1
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            var scrollViewer = Pivot.GetScrollViewer();

            if (scrollViewer != null)
            {
                scrollViewer.DirectManipulationStarted += ScrollViewer_DirectManipulationStarted;
            }
        }
예제 #2
0
        private void ScrollViewer_DirectManipulationStarted(object sender, object e)
        {
            var transform = Pivot.TransformToVisual(Window.Current.Content as UIElement);
            var point     = transform.TransformPoint(new Point());

            var rect = new Rect(point.X, point.Y, Pivot.ActualWidth, 48);

            if (rect.Contains(Window.Current.CoreWindow.PointerPosition))
            {
                Pivot.GetScrollViewer().CancelDirectManipulations();
            }
        }