Questions tagged [doubleanimation]

Use this tag for questions related to DoubleAnimation .Net framework class for animating the value of a Double.

DoubleAnimation is a .Net framework class for animating the value of a Double property between two target values using linear interpolation over a specified Duration.

77 questions
13
votes
1 answer

Is there any event that fires when WPF animation ends?

Is there any event that fires when WPF Animation ends? void HideDefaultScreenImageTimer_Tick(object sender, EventArgs e) { HideDefaultScreenImageTimer.Stop(); var doubleAnimation = new DoubleAnimation(1, 0, new…
Terminador
  • 1,328
  • 4
  • 14
  • 23
13
votes
1 answer

Run action when c# wpf animation ends

I'm learning wpf and at the same time developing an app with it. I'm having a hard time figuring out how i can run something when a doubleanimation (Or other sorts) is done. For instance: DoubleAnimation myanim = new DoubleAnimation(); myanim.From =…
user1446632
  • 417
  • 2
  • 9
  • 24
4
votes
2 answers

WPF Double Animation Not working Properly C#

When I try to animate my main window only Height is getting animated, however when i use the same code to animate my grid it is working fine.Please help me out, as i am new to wpf
4
votes
0 answers

DoubleAnimation.Completed event triggered at the end of the Storyboard

So I have a Storyboard that will run multiple animations one after each other (not all of them simultaneously) and in some of those animations I subscribe to the DoubleAnimation.Completed event. The animations run perfectly fine, but the Completed…
Agustin0987
  • 581
  • 6
  • 15
4
votes
0 answers

How to set dynamic DoubleAnimation To or From values

I have a number of scenarios where I am doing simple WPF storyboard animations as such.
Maxim Gershkovich
  • 45,951
  • 44
  • 147
  • 243
4
votes
2 answers

How to animate TranslateTransform and ScaleTransform in WPF

I'm trying to animate the TranslateTransform and ScaleTransform of a Rectangle at the same time using a StoryBoard in code-behind. I studied some similar questions but I some how I'm still stuck at the first step.
Vahid
  • 5,144
  • 13
  • 70
  • 146
3
votes
1 answer

WPF - Starting animation after another animation is finished in xaml

I am using WPF and I have 2 storyboard animations. I want the second animation to start after the first one is finished. How do I do that in the xaml code?
Golan Kiviti
  • 3,895
  • 7
  • 38
  • 63
2
votes
2 answers

How to create a time delay between two animations in wpf

I am new in WPF, I just want to animate two objects one after the other. That means that 2nd animation should start after 1st is finished. I tried using Timer and Sleep methods which didn't work well. Below is a sample code: DoubleAnimation da1 =…
HN Learner
  • 544
  • 7
  • 19
2
votes
1 answer

Move a label in XAML

all I'm trying to do is move a label from one position to another, but when I use the following code and run the application, the IDE tells me that the application went into break mode and then stopped. The following code is all I have inside the…
user5652250
2
votes
1 answer

Set Image Opacity with an DoubleAnimation

This should be fairly simple but I can’t seem to get it right. I have a collection of System.Windows.Controls.Image. When I select one of them, I would like all the others to get an opacity of 0.5. I’m using MVVM, and the logic behind this (finding…
Viking
  • 293
  • 4
  • 12
2
votes
1 answer

WPF Rectangle Triggers when Visible for DoubleAnimation StoryBoard

I have a DoubleAnimation which fades in/out a Rectangle in WPF
NotMe
  • 745
  • 2
  • 7
  • 26
2
votes
1 answer

WPF Animation (changing multiple properties of single element at the same time)

I need to animate multiple properties of one ui element at the same time. For example, decreasing width and height of windows synchronously. Any idea? DoubleAnimation widthAnimation = new DoubleAnimation { To =…
Matrix
  • 125
  • 2
  • 6
2
votes
1 answer

can't stop storyboard animation, i can only begin it

i'm trying to manage an animation with a storyboard, it'a blinking label and to achive this effect i have used this code (with animation i preefer to work only in code behind): I declare my story board; public partial class Example: Page { …
user31929
  • 1,115
  • 20
  • 43
2
votes
2 answers

Setting manual control properties doesn't work before an animation in WPF

I have an image in a Canvas, but when I use DoubleAnimation to move it and then use Canvas.SetLeft(image), the method is ignored, the only way to move it again is with animations. What's wrong with Canvas.SetLeft(control)? Here is an explanation…
FukYouAll
  • 111
  • 1
  • 3
  • 15
1
vote
0 answers

Can you get the final value from an animation before that animation has completed?

Say I start a four-second DoubleAnimation on the Canvas.Left property of a control that animates the value from its current value to 100 and that animation was started by calling BeginAnimation on that control in code-behind. void Animate(Control…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
1
2 3 4 5 6