Independent Versus Dependent Animations
Speaking of animating an element’s Width, it would be natural to try to repurpose the previous DoubleAnimation to animate the Button’s Width instead of its Opacity. After all, Width is a dependency property, and it’s of type double. So this should work, right? Well, yes, but not by default for Windows Store and universal apps.
Animations that operate on an element’s Opacity, RenderTransform, or Projection can run on the GPU (in other words, are hardware accelerated) because the underlying visual surface being manipulated doesn’t need to change. So can animations on the Canvas.Left and Canvas.Top attached properties, which is effectively the same as animating a TranslateTransform. These are examples of independent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access