WPF Button Background Animation? | Programming, .NET, Silverlight & More

WPF Button Background Animation?

Hello. I’m trying to set a button style with MouseEnter and MouseLeave EventTriggers that change the background. When I mouse over, for a moment I see my animation start, but then it immediately gets overridden by the default mouse-over animation. My MouseLeave animation works fine. Anyone know what property trigger or event trigger I need to override?

I would check the property trigger for Button.IsMouseOver property or Button.MouseMove.

I’m not sure what you are trying to achieve, but this might be easier done by using a control template… something along the lines of:

No TweetBacks yet. (Be the first to Tweet this post)

One Response

  1. Adam Says:

    I would check the property trigger for Button.IsMouseOver property or Button.MouseMove.

    I’m not sure what you are trying to achieve, but this might be easier done by using a control template… something along the lines of:

    References :
    http://msdn.microsoft.com/en-us/library/system.windows.controls.button.aspx

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.