I have a storyboard that should start anytime a certain event - from another object - is called.
So far, I solved using a trick like this
<DataTrigger Binding="{Binding IsUpdating}" Value="True"><DataTrigger.EnterActions><BeginStoryboard><Storyboard> ...</Storyboard></BeginStoryboard></DataTrigger.EnterActions></DataTrigger>
When the event on my ViewModel is fired, I use this trick:
// event fired App.Current.Dispatcher.BeginInvoke((Action)delegate() { IsUpdating = false; IsUpdating = true; });
Sure this code works, but this is not a very elegant way.
Any better solution to make the storyboard begin from the event ?