This project is read-only.

AnimationHelper Example

Apr 11, 2013 at 3:12 AM
I'm looking for an AnimationHelper example I currently have an animation that i want to monitor is its complete or not.

Apr 12, 2013 at 6:45 AM
AnimationHelper doesn't give you anything like that. It's merely there to give you a simple way to get an animation to play by assigning it to an element in XAML. It defines two attached properties - AnimationHelper.Storyboard that you can use to assign a Storyboard to run and AnimationHelper.IsPlaying which doesn't actually tell you whether a Storyboard is playing, but gives you a way to stop or start a Storyboard with a bound ToggleButton's IsChecked property. To get an event you should simply subscribe to the Completed event of your Storyboard.

A solution I find most useful is to actually use AwaitableUI.StoryboardExtensions.BeginAsync() - simply call

await myStoryboard.BeginAsync();

and when that call returns - your animation has completed.