 <p>You can also do it in pure xaml, just use trigger action:</p> <pre><code> &lt;Button&gt; &lt;Button.Triggers&gt; &lt;EventTrigger RoutedEvent="PreviewMouseDown"&gt; &lt;BeginStoryboard Storyboard="{DynamicResource BotRotation}"/&gt; &lt;/EventTrigger&gt; &lt;/Button.Triggers&gt; &lt;/Button&gt; </code></pre>