In this post, Andrej Tozon shows how to use
Reactive Extensions in
Silverlight to gradually fill a
ListBox, with a bonus of a nice item entry animation, provided by the layout states.
Source: Andrej Tozon's blog
I’ve been working on several applications where I needed to display several items in a ListBox (or an ItemsControl) at startup, but they had to appear on the screen one by one, with a short delay, not all at once. Using ListBoxItem’s layout states took care of handling how an individual item would appear in the list, but I still needed to handle a short pause between each item being added to the list. Usually I resorted to using a Timer, which sorted out that needed delay for me, but that really felt like hacking that had nothing to do with the real problem. Reactive Extensions, however, offer a much elegant solution.