I have a Button in a DataTemplate that is bound to a Command in my ViewModel. The button also has an EventTrigger that kicks off a Storyboard that hides the edit controls (of which the button is a part.)
The Storyboard works fine if I pick up the PreviewMouseDown event, but the Command never gets called. If I pick up the MouseDown event in my EventTrigger, the Command works, but the Storyboard doesn't execute.
How can I get both the Command and the Storyboard to execute when the button is clicked?
<Button Content="Save" Command="{Binding SaveCommand}" >
<Button.Triggers>
<EventTrigger RoutedEvent="Button.PreviewMouseDown">
<EventTrigger.Actions>
<BeginStoryboard Storyboard="{DynamicResource sbCloseTitleEdit}"/>
</EventTrigger.Actions>
</EventTrigger>
</Button.Triggers>
</Button>