private void OnStylusMove(object sender, StylusEventArgs e) { if (!this.IsTouchNavigationEnabled) { return; } var x = _scrollViewer.ContentHorizontalOffset + _downPoints[0].X - e.GetStylusPoints(sender as IInputElement)[0].X; _scrollViewer.ScrollToHorizontalOffset(x); }
private static void OnHorizontalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { AnimatableScrollViewer viewer = d as AnimatableScrollViewer; viewer.ScrollToHorizontalOffset((double)e.NewValue); }