Book Image

MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide

By : Johnny Tordgeman
Book Image

MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide

By: Johnny Tordgeman

Overview of this book

Microsoft Silverlight is a powerful development platform for creating engaging, interactive applications for many screens across the Web, desktop, and mobile devices. Silverlight is also a great (and growing) Line-Of-Business platform and is increasingly being used to build data-driven business applications. Silverlight is based on familiar .NET languages such as C# which enables existing .NET developers to get started developing rich internet applications almost immediately. "MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide" will show you how to prepare for and pass the (70-506): TS: Microsoft Silverlight 4 Development exam.Packed with practical examples and Q&As, MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide starts by showing you how to lay out a user interface, enhance the user interface, implement application logic, work with data and interact with a host platform amongst others.
Table of Contents (15 chapters)
MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Manipulating visuals


Silverlight, being an RIA platform allows you to manipulate your UI objects in far more ways than simple size or position. You can skew an element, rotate it across its x and y positions, scale it, and even emulate 3D effects by using the perspective transform.

Getting ready

Before we dive into manipulating objects, we need to have an object to manipulate.

Open Visual Studio 2010 and create a new Silverlight 4 project named Chapter3-ManipulateVisuals. Once the project is ready, add a Rectangle object to MainPage.xaml using the following code snippet:

<Rectangle Height="100" Width="100" Fill="Red">
</Rectangle>

This rectangle will be the base of all our visual manipulations. Build and run your application, and you should get the result, as shown in the following screenshot:

Skew transform

The first transformation we are going to discuss is skew transformation. Skew takes a rectangular element and turns it into a parallelogram by skewing the values of the x or...