Applying transforms on elements

Transforms allow manipulating an entity's coordinates in various ways, the most common being translating (moving), scaling, and rotating. This ability provides a lot of flexibility in the way elements (and other objects) present themselves. Combined with animations and some creativity, transforms are even more powerful. In this recipe, we'll examine the ways to use transforms and discuss the available transform types.

Getting ready

Make sure Visual Studio is up and running.

How to do it...

We'll create some images and apply a rotation transform to some, showing the common properties that accept transforms:

  1. Create a new WPF application named CH09.Transforms.
  2. Add an existing image to the project, such as "penguins.jpg ...

Get Windows Presentation Foundation 4.5 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.