Skip to content

Instantly share code, notes, and snippets.

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