O'Reilly logo

Windows Presentation Foundation 4.5 Cookbook by Pavel Yosifovich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required