I'm trying to accomplish something like this:
<DataTemplate.Triggers>
<EventTrigger RoutedEvent="{Binding MyEvent}">
<BeginStoryboard Storyboard="{StaticResource MyAnimation}" />
</EventTrigger>
</DataTemplate.Triggers>
MyEvent is event from my DataContext.
This does not work because RoutedEvent can't be Binding expression. Any idea how to accomplish this? In fact, I need some mix of EventTrigger and DataTrigger...
Solution with Blend SDK:
<Interactivity:Interaction.Triggers>
<Interactivity:EventTrigger SourceObject="{Binding}" EventName="MyEvent">
<ei:ControlStoryboardAction ControlStoryboardOption="Play">
<ei:ControlStoryboardAction.Storyboard>
<Storyboard>
....
</Storyboard>
</ei:ControlStoryboardAction.Storyboard>
</ei:ControlStoryboardAction>
</Interactivity:EventTrigger>
</Interactivity:Interaction.Triggers>