I’m looking for a Windows Phone control (or source code) in order to have a counter similar to the one showing the unread count for SMS and mail in the home screen. When the value changes from 2 to 5 for example, we have various animations showing briefly 3, 4 and 5.
Share
one way is to use
Reactive Extension.First you need
Microsoft.Phone.ReactiveandSystem.Observablereferences.In my xaml page, I defined a
TextBlocknamedNumberTextBlock. Also I created aStoryboardthat animates the appearance of theTextby modifying itsScaleY.In my code-behind, I used a method from
RxcalledGenerateFromTime()which adds a time dimension to generated sequence.TimeSpan.FromMilliseconds(100)here is the delay between each number.You can read more about
Rxfrom here and here (Silverlight TV).Hope this helps. 🙂