Book Image

Windows Presentation Foundation Development Cookbook

Book Image

Windows Presentation Foundation Development Cookbook

Overview of this book

Windows Presentation Foundation (WPF) is Microsoft's development tool for building rich Windows client user experiences that incorporate UIs, media, and documents. With the updates in .NET 4.7, Visual Studio 2017, C# 7, and .NET Standard 2.0, WPF has taken giant strides and is now easier than ever for developers to use. If you want to get an in-depth view of WPF mechanics and capabilities, then this book is for you. The book begins by teaching you about the fundamentals of WPF and then quickly shows you the standard controls and the layout options. It teaches you about data bindings and how to utilize resources and the MVVM pattern to maintain a clean and reusable structure in your code. After this, you will explore the animation capabilities of WPF and see how they integrate with other mechanisms. Towards the end of the book, you will learn about WCF services and explore WPF's support for debugging and asynchronous operations. By the end of the book, you will have a deep understanding of WPF and will know how to build resilient applications.
Table of Contents (13 chapters)
2
Using WPF Standard Controls

How it works...

When a key frame animation begins, it iterates through the specified key frames in the order they were defined by their KeyTime properties. If there exists no key frame at time 0 (initial point), the animation creates a transition between the target property's current value and the Value of the first key frame defined in the collection.

If the animation's Duration is Automatic or set to the time of the last key frame, the animation ends.

In the preceding demonstration, the first key frame (at time 0) sets the animation's output value to Canvas.Left="50" and Canvas.Top="100". In the next key frame (at time 1 sec), the output value sets to the (450,200) coordinate point, and you will see a smooth transition between the (50,100) and the (450,200) points. Similarly, in the third and fourth seconds, the circle transitions from (450,200) to (450,50) and then to the (250,150) coordinate points.

As the defined Storyboard has an AutoReverse property...