Sunday, June 2, 2013

WPF Animation Clock not doing anything?

WPF Animation Clock not doing anything?

I have the following code:
private void UserControl_MouseEnter_1(object sender, MouseEventArgs e)
{
    FadingBox.ApplyAnimationClock(Border.OpacityProperty, OverClock);
}
private void UserControl_Loaded_1(object sender, RoutedEventArgs e)
{
    OverAnime = new DoubleAnimation(FadingBox.Opacity, 90, TimeSpan.FromMilliseconds(1600));
    OverClock = OverAnime.CreateClock();
}
this is the code for when you hover over a button, it lights up (by fading and becoming less transparent). I also have nearly identical code for when you leave off of the button, it goes back to normal. The only problem--it does nothing. I put in a breakpoint on it, and it wasn't set to null, I tried using BeginAnimation() instead, that doesn't fade correctly, I looked it up online and I can't figure out why it's not working. Any ideas?