Questions tagged [wpf-animation]

Animation is an illusion that is created by quickly cycling through a series of images, each slightly different from the last. The brain perceives the group of images as a single changing scene. In film, this illusion is created by using cameras that record many photographs, or frames, each second. When the frames are played back by a projector, the audience sees a moving picture.

Windows Presentation Foundation (WPF) provides a powerful set of graphics and layout features that enable you to create attractive user interfaces and appealing documents. Animation can make an attractive user interface even more spectacular and usable. By just animating a background color or applying an animated Transform, you can create dramatic screen transitions or provide helpful visual cues.

Reference

159 questions
1
vote
2 answers

WPF mouse click returns storyboard to previous state

This piece of code animates the movement of an ellipse if click on this. How can I return (in an animated way - as the storyboard does) the ellipse in the initial position by clicking again on its new position. Is that possible? (preferably only in…
gts13
  • 1,048
  • 1
  • 16
  • 29
1
vote
1 answer

Scaling animation - Can't return to scale:1

I've been trying to scale a grid through a storyboard animation. This is the animation:
slanden
  • 1,199
  • 2
  • 15
  • 35
1
vote
1 answer

How to create a panel that animates in and only leaves if it isn't triggered after a set time?

I have a simple Border element in my view with a child TextBlock that is bound to a string that represents the status of a process in my application. I am trying to animate this border so that it slides in to view from off-screen when the string…
Kyle V.
  • 4,752
  • 9
  • 47
  • 81
1
vote
0 answers

Outstanding timer request on while WPF animation plays

any animation in WPF makes a request a timer resolution of 1ms, lower than the 15.6ms default by Windows, which causes battery drain while any animation is running. I'm using .net 4.5 and running in Windows 10 but it's also happening in Windows 7…
Antonyo
  • 23
  • 6
1
vote
1 answer

correct way to animate objects in wpf and c#

I want to create a animation with WPF, but I dont know the right way. The animation should be async. The animation should be a rectangle that grows (height) . Is a canvas object for something like that a good choose? Maybe someone of you can give…
MyNewName
  • 1,035
  • 2
  • 18
  • 34
1
vote
1 answer

How to scale down Image with DoubleAnimation

I have DoubleAnimations's to move my Image element from one place to another, however when I've tried adding in another DoubleAnimation to scale the image down, my code breaks, this is my code: private Point GetAbsolutePosition(UIElement element) { …
KTOV
  • 559
  • 3
  • 14
  • 39
1
vote
1 answer

Animation breaks binding

I have a ComboBox whose Opacity property has the following binding: Opacity="{Binding ElementName=stackPanel, Path=IsMouseOver, Converter={StaticResource mouseOverConverter}}" Basically, if the IsMouseOver property is true, the ComboBox has an…
Tim Kathete Stadler
  • 1,067
  • 4
  • 26
  • 52
1
vote
1 answer

Smooth ExitAction in WPF Trigger using Storyboard

I have a WPF aplication and here I want to override the ugly default WPF styles. I have created the Styles.xaml dictionary and here I have almost finished with styles, but there are some problems with animation and smooth transition between…
Tomas
  • 1,212
  • 1
  • 9
  • 10
1
vote
1 answer

How can I animate Label.Content with a DoubleAnimation?

A DoubleAnimation changes a double value over time. I would like to set the Content property of a Label to this value. However, this fails because WPF does not convert the double to a string. Do I have to subclass the Label and add a new double…
mafu
  • 31,798
  • 42
  • 154
  • 247
1
vote
1 answer

Toggle Button IsMouseOver Animation

I would like to add a fade out animation when a ToggleButton IsChecked=false and IsMouseOver is deactivating. I have a toggle button with a custom control template. The following triggers are setup and work great. When IsChecked=true display…
cgatian
  • 22,047
  • 9
  • 56
  • 76
1
vote
2 answers

How to stop an animation in WPF

I have the following code to start an animation that it's located in my Resources: Storyboard _wheelAnimation = FindResource("CircleRotation") as Storyboard; if (_wheelAnimation == null) return; _wheelAnimation.Begin(this); Here is my…
Sonhja
  • 8,230
  • 20
  • 73
  • 131
1
vote
1 answer

Playing the animation after "FrameworkElement.Loaded" and before "Unloaded" (in ListBoxItem)

I have ListBox: ListBox style: