Book Image

Mastering Windows Presentation Foundation

By : Yuen
Book Image

Mastering Windows Presentation Foundation

By: Yuen

Overview of this book

Windows Presentation Foundation is rich in possibilities when it comes to delivering an excellent user experience. This book will show you how to build professional-grade applications that look great and work smoothly. We start by providing you with a foundation of knowledge to improve your workflow – this includes teaching you how to build the base layer of the application, which will support all that comes after it. We’ll also cover the useful details of data binding. Next, we cover the user interface and show you how to get the most out of the built-in and custom WPF controls. The final section of the book demonstrates ways to polish your applications, from adding practical animations and data validation to improving application performance. The book ends with a tutorial on how to deploy your applications and outlines potential ways to apply your new-found knowledge so you can put it to use right away.
Table of Contents (13 chapters)

Easing functions


When declaring animations with WPF, we are able to utilize a powerful capability that helps us to define more specialized animations. While we normally provide a start and end value for our animations and let WPF interpolate the intermediate values, there is a way that we can affect this interpolation process.

There are a number of mathematical functions that provide complex animation paths and are known as easing functions. For example, these can accurately replicate the movement of a spring, or the bounce of a ball.

We can simply declare the appropriate easing function within the EasingFunction property of the animation. Each easing function extends the EasingFunctionBase class and has its own specific properties. For example, the BounceEase element provides Bounces and Bounciness properties, while the ElasticEase class declare the Oscillations and Springiness properties.

All easing functions inherit the EasingMode property from the base class. This property is of the enumeration...