Skip to content

Instantly share code, notes, and snippets.

@rkusa
Created October 8, 2010 18:50
Show Gist options
  • Save rkusa/617314 to your computer and use it in GitHub Desktop.
Save rkusa/617314 to your computer and use it in GitHub Desktop.
var observable = Observable.GenerateWithTime(_firstInViewport, x => x <= _lastInViewport, x => x,
x => TimeSpan.FromMilliseconds(50), x => x + 1);
observable.Subscribe(i => Dispatcher.BeginInvoke(() =>
VisualStateManager.GoToState(
(ListBoxItem)MainListBox.ItemContainerGenerator
.ContainerFromIndex(i), "AfterLoaded", true)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment