public void VerifyCallingResetMultipleTimesOnUniqueIdItemsSource() { RunOnUIThread.Execute(() => { var data = new CustomItemsSourceWithUniqueId(Enumerable.Range(0, 5).ToList()); var repeater = new ItemsRepeater() { ItemsSource = data, Animator = new DefaultElementAnimator() }; Content = new Windows.UI.Xaml.Controls.ScrollViewer() { Width = 400, Height = 400, Content = repeater }; Content.UpdateLayout(); data.Reset(); data.Reset(); Content.UpdateLayout(); Verify.AreEqual(5, repeater.ItemsSourceView.Count); for (int i = 0; i < 5; i++) { Verify.IsNotNull(repeater.TryGetElement(i)); } }); }
void ScrollLeft() { if (m_textContainer.HorizontalOffset > 0) { double offset = m_textContainer.HorizontalOffset - (scrollRatio * m_textContainer.ViewportWidth); m_textContainer.ChangeView(offset, null, null); m_textContainer.UpdateLayout(); UpdateScrollButtons(); } }