public async Task When_VerticalScrollViewer_NotScrolled_Bottom() { VerticalScrollViewer.ChangeView(0, 0, null, disableAnimation: true); await Task.Delay(25); var sut = ScrollBottom.TransformToVisual(VerticalScrollViewerParent); var result = sut.TransformBounds(new Rect(0, ScrollBottom.ActualHeight, 50, 50)); Assert.AreEqual(new Rect(0, _svExtent, 50, 50), result); }
public async Task When_VerticalScrollViewer_Scrolled_Bottom() { var offset = _svExtent - _svHeight; VerticalScrollViewer.ChangeView(0, offset, null, disableAnimation: true); await Task.Delay(25); var sut = ScrollBottom.TransformToVisual(VerticalScrollViewerParent); var result = sut.TransformBounds(new Rect(0, ScrollBottom.ActualHeight, 50, 50)); Assert.IsTrue(RectCloseComparer.UI.Equals(new Rect(0, _svHeight, 50, 50), result)); }