Пример #1
0
        private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            var transform = TargetView.TransformToVisual(EnclosingView);
            var targetY   = transform.TransformPoint(new Point(0, 0)).Y;
            var tracker   = TrackerView;

            Windows.UI.Xaml.Controls.Canvas.SetTop(tracker, targetY);
        }
Пример #2
0
        private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            var transform = TargetView.TransformToVisual(EnclosingView);
            var target    = transform.TransformPoint(new Point(0, 0));

            Windows.UI.Xaml.Controls.Canvas.SetLeft(TrackerViewX, target.X);
            Windows.UI.Xaml.Controls.Canvas.SetTop(TrackerViewY, target.Y);

            OffsetTextBlock.Text = target.ToString();
        }