private void ResetView(UIElement element) { Scroller scroller = element as Scroller; if (scroller != null) { scroller.ScrollTo( 0.0, 0.0, new ScrollOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)); int viewChangeId = scroller.ZoomTo( 1.0f, System.Numerics.Vector2.Zero, new ZoomOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)).ZoomFactorChangeId; if (this.scroller3 == scroller) { scroller3ZoomFactorChangeId = viewChangeId; } } else { ScrollViewer scrollViewer = element as ScrollViewer; scrollViewer.ChangeView(0, 0, 1.0f, true /*disableAnimation*/); } }
private void ResetView(ScrollViewer scrollViewer) { Scroller scroller = ScrollViewerTestHooks.GetScrollerPart(scrollViewer); string scrollerId = (VisualTreeHelper.GetParent(scroller) as FrameworkElement).Name + "." + scroller.Name; int viewChangeId = scroller.ScrollTo(0.0, 0.0, new ScrollOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)).OffsetsChangeId; this.fullLogs.Add(scrollerId + " ScrollTo requested. Id=" + viewChangeId); viewChangeId = scroller.ZoomTo(1.0f, System.Numerics.Vector2.Zero, new ZoomOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)).ZoomFactorChangeId; this.fullLogs.Add(scrollerId + " ZoomTo requested. Id=" + viewChangeId); if (scrollViewer == this.scrollViewer52) { scrollViewer52ZoomFactorChangeId = viewChangeId; } }
private void ResetView(Scroller scroller) { int viewChangeId = scroller.ScrollTo( 0.0, 0.0, new ScrollOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)).OffsetsChangeId; this.fullLogs.Add(scroller.Name + " ScrollTo requested. Id=" + viewChangeId); viewChangeId = scroller.ZoomTo( 1.0f, System.Numerics.Vector2.Zero, new ZoomOptions(AnimationMode.Disabled, SnapPointsMode.Ignore)).ZoomFactorChangeId; this.fullLogs.Add(scroller.Name + " ZoomTo requested. Id=" + viewChangeId); if (this.scroller52 == scroller) { scroller52ZoomFactorChangeId = viewChangeId; } }