private void ResetView(Scroller scroller) { int viewChangeId = scroller.ChangeOffsets(new ScrollerChangeOffsetsOptions(0.0, 0.0, ScrollerViewKind.Absolute, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); this.fullLogs.Add(scroller.Name + " ChangeOffsets requested. Id=" + viewChangeId); viewChangeId = scroller.ChangeZoomFactor(new ScrollerChangeZoomFactorOptions(1.0f, ScrollerViewKind.Absolute, System.Numerics.Vector2.Zero, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); this.fullLogs.Add(scroller.Name + " ChangeZoomFactor requested. Id=" + viewChangeId); if (this.scroller52 == scroller) { scroller52ZoomFactorChangeId = viewChangeId; } }
private void ResetView(ScrollViewer scrollViewer) { Scroller scroller = ScrollViewerTestHooks.GetScrollerPart(scrollViewer); string scrollerId = (VisualTreeHelper.GetParent(scroller) as FrameworkElement).Name + "." + scroller.Name; int viewChangeId = scroller.ChangeOffsets(new ScrollerChangeOffsetsOptions(0.0, 0.0, ScrollerViewKind.Absolute, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); this.fullLogs.Add(scrollerId + " ChangeOffsets requested. Id=" + viewChangeId); viewChangeId = scroller.ChangeZoomFactor(new ScrollerChangeZoomFactorOptions(1.0f, ScrollerViewKind.Absolute, System.Numerics.Vector2.Zero, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); this.fullLogs.Add(scrollerId + " ChangeZoomFactor requested. Id=" + viewChangeId); if (scrollViewer == this.scrollViewer52) { scrollViewer52ZoomFactorChangeId = viewChangeId; } }
private void ResetView(UIElement element) { Scroller scroller = element as Scroller; if (scroller != null) { scroller.ChangeOffsets(new ScrollerChangeOffsetsOptions(0.0, 0.0, ScrollerViewKind.Absolute, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); int viewChangeId = scroller.ChangeZoomFactor(new ScrollerChangeZoomFactorOptions(1.0f, ScrollerViewKind.Absolute, System.Numerics.Vector2.Zero, ScrollerViewChangeKind.DisableAnimation, ScrollerViewChangeSnapPointRespect.IgnoreSnapPoints)); if (this.scroller3 == scroller) { scroller3ZoomFactorChangeId = viewChangeId; } } else { ScrollViewer scrollViewer = element as ScrollViewer; scrollViewer.ChangeView(0, 0, 1.0f, true /*disableAnimation*/); } }