coloranimation

WPF - Making an animation's execution conditional on a property of the bound data item

I have a data object -- a custom class called Notification -- that exposes a IsCritical property. The idea being that if a notification will expire, it has a period of validity and the user's attention should be drawn towards it. Imagine a scenario with this test data: _source = new[] { new Notification { Text = "Just thought you ...

WPF ColorAnimation for a Brush property

Hi, I wonder if someone can help me - I've got a label which I need to be able to cross-fade between any 2 colors when a method is called in the code behind. My best attempt so far: Private OldColor as Color = Colors.White Sub SetPulseColor(ByVal NewColor As Color) Dim F As New Animation.ColorAnimation(OldColor, NewColor, New Dura...

How do I bind to a color in a WPF ColorAnimation?

I would like to do something that is seemingly quite simple, but I cannot figure out how to do it. I have a ColorAnimation that is triggered when the MouseEnter event occurs. It simply changes the background color of a Border from one color to another color. Unfortunately, I can't figure out how to put anything but hardcoded colors in...

WPF ColorAnimation seems to retain part of original colour?

Hi guys, I'm having a strange problem with a colour animation. I have a list of items bound to a listbox. These items have an enum property which can have one of three values - NoRemarks, RemarksFound and RemarksUpdated. On the datatemplate for this listbox, I have a rectangle which displays a colour related to the item status - Red,...

Silverlight 4 Foreground ColorAnimation

I am trying to animate the Foreground color of a hyperlinkbutton when the user MouseOver the control. I created a custom style in which I want to animate the Foreground color. The Foreground color is set like so <Setter Property="Foreground" Value="#FF73A9D8"/> In the visualStateManager section I have the following element for the Co...

.NET - ColorAnimation doesn't work

I created a ColorAnimation for a SpotLight-object, but it doesn't seem to work. What am I doing wrong? ColorAnimation mouseEnterColorAnimation = new ColorAnimation(); mouseEnterColorAnimation.To = Colors.Red; mouseEnterColorAnimation.Duration = TimeSpan.FromSeconds(5); Storyboard.SetTargetName(mouseEnterColorAnimation, "MyAnimatedBrush"...