Chapter 9. Using Graphics and Visuals

Silverlight includes all of the core primitive elements you would expect in a platform designed to provide a compelling visual experience. These basic elements include the Rectangle, Ellipse, Path, Image, and MediaElement controls. When listed, these controls can seem basic and boring, yet impressively complex visuals can be created from this simple toolset. In addition to these base controls, Silverlight 3 adds bitmap effects, support for HLSL shaders, and Perspective 3D. These last three items can empower a limitless array of visual effects in your applications. In this chapter, we'll start by covering the basic building block controls and how they are defined in XAML to provide a firm foundation of understanding. Along the way, you'll see how to use Blend to save some time manually creating these elements. We'll then see how both effects and 3D can fit into your application and look at the tooling that supports them. We'll wrap up our discussion by looking at design tools other than Blend and discuss how those tools can fit into your Silverlight workflow.

The Basics

Let's get started by looking at the core Silverlight controls at your disposal to create visuals. We'll look at each control individually and cover XAML composition of that control. Along the way, I'll try to point out things you need to be aware of when working with particular controls.

Rectangles and Borders

The Rectangle control can serve as a foundation for many UI elements. Most ...

Get Silverlight™ 3 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.