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…
![](../../users/profiles/1796177.webp)
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…
![](../../users/profiles/24874.webp)
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…
![](../../users/profiles/156755.webp)
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…
![](../../users/profiles/568968.webp)
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…
![](../../users/profiles/119093.webp)
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…
![](../../users/profiles/1254555.webp)
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…
![](../../users/profiles/815052.webp)
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…
![](../../users/profiles/93306.webp)
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…
![](../../users/profiles/186780.webp)
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."