Questions tagged [coloranimation]

71 questions
58
votes
8 answers

Wpf animate background color

I need help in taking right decision. I need to animate a background color of my user control when some event happens. When it is, I want to change the background just for 1 second and then turn it back. Which way should I go? Use color animation or…
Taras
  • 1,048
  • 2
  • 11
  • 19
15
votes
5 answers

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…
Drew Noakes
  • 266,361
  • 143
  • 616
  • 705
14
votes
2 answers

WPF ColorAnimation for a Brush property

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…
Basic
  • 25,223
  • 23
  • 108
  • 188
7
votes
1 answer

round brackets in xaml syntax

when I'm using ColorAnimation to change Background of control i'm using following syntax: I'm very happy it works but I…
lukasz
  • 73
  • 3
7
votes
3 answers

WPF: How to animate color change?

I have a grid, a window root element. I want to apply an animation which would change it's background color from white to green in 5 seconds. Here's what I did: private void Window_Loaded(object sender, RoutedEventArgs e) { ColorAnimation…
Boris
  • 9,363
  • 30
  • 98
  • 144
7
votes
3 answers

How to increment / decrement hex color values with javascript / jQuery

Is it possible to increment or decrement hex color values on a step-by-step basis in jQuery / javascript? What I would like to do is something like this: Adapting from a for-loop like for (var i = 0; i <= 100; i++) { console.log(i); } I…
TimG
  • 955
  • 3
  • 14
  • 23
6
votes
1 answer

WPF DataGrid - highlight new rows when inserted into datagrid

I have a datagrid bound to an ObservableCollection, and what I'd like to do is highlight new rows when they are added to the datagrid (i.e. when a new object is inserted into the ObservableCollection). I'd like to highlight the rows when they are…
JPProgrammer
  • 470
  • 8
  • 17
6
votes
2 answers

Dynamic View Animations using MVVM

I've been trying to figure out how to effectively trigger animations in a View when a property in the ViewModel updates, where the animation depends on the value of said property. I've recreated my problem in a simple application with a single View…
Will Eddins
  • 12,890
  • 5
  • 46
  • 83
5
votes
1 answer

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…
David
  • 1,546
  • 3
  • 21
  • 29
4
votes
1 answer

WPF - ColorAnimation completed event

I want to be notified when the animation is completed. However, when I apply the following code, I get the following error "The event 'Completed' cannot be specified on a Target tag in a Style. Use an EventSetter instead."
Terenced
  • 635
  • 2
  • 6
  • 17
3
votes
2 answers

Changing StackPanel Background color with ColorAnimation

Well, I'm trying to change the Background color of a StackPanel in a DataTemplate using ColorAnimation:
liranxs
  • 57
  • 1
  • 1
  • 4
3
votes
1 answer

Borderbrush coloranimation fade in and out

i have a border , and i change it's borderbrush in the run time. now i need this border to be glowing all the time, whatever the color was. i tried this but i have problems. any one can help?
Ziad
  • 187
  • 2
  • 3
  • 13
3
votes
1 answer

Animate Fill Color of a Path In a Canvas

I'm trying to figure out how to animate the fill color of some paths I have inside of a canvas, which reside in ViewBoxes so they are stretched. My goal here is to change the fill color of these Paths from the NormalBrush color to the HoverBrush…
JacobJ
  • 2,887
  • 3
  • 25
  • 31
3
votes
1 answer

Cannot animate the color property because the object is sealed or frozen

Ive seen other similiar issues but they alwayse seem to be doing this in XAML, since this is in an event handler I need to figure out the answer in c#. basically I just need the sending menu item to blink red. ColorAnimation ca = new…
Wobbles
  • 2,789
  • 1
  • 19
  • 44
3
votes
1 answer

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
John Soer
  • 541
  • 1
  • 7
  • 20
1
2 3 4 5