Cant get button animation to work RRS feed

  • Question

  • Hi everyone,
    I have a small problem that i can't get to work. I made a transparent button with eclipse in it and then added the IsMouseOver True. False; IsPressed True, False. The IsMouseOver True works well, IsPressed True works well, IsPressed False looks like it's working, IsMouseOver False works at start but when you press the button it doesn't restore the graphics. So can anyone help completing the button? I was working all day but just couldn't get that damn thing to work. A tutorial with similar solution would be great too.

    I'm using Expression Blend 2.

    I uploaded the whole solution because i don't know which part to give.
    Friday, July 10, 2009 4:25 PM


  • Hi,

    Without spending too much time on it, it seems that your IsPressed storyboard is also painting a transparent rectangle with a green gradient.
    Since this storyboard still plays and is never stopped your OnMouseOver have no effect.

    Maybe you want to just remove the rectangles animation of the IsPressed so that the OnMouseOver animation will have an effect.

    You can change the following resource of yours to be like this to understand what I mean:



    Storyboard x:Key="Pressed_N">



    <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">



    <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FF2A477A"/>







    Hope it helps.
    • Marked as answer by SkrowTox22 Tuesday, July 21, 2009 5:20 PM
    Saturday, July 11, 2009 4:01 PM