The goal of this book is to take you, the developer who’s at least a little familiar with C# and .NET, and help you become an awesome Silverlight developer. If you’re already an awesome Silverlight developer, I’ve included deep topics to help you learn more about the platform and how things work under the covers.
After you’ve read this book, you should be able to confidently design, develop, and deliver Silverlight applications that meet your application requirements. To facilitate the learning process, I’ve structured the book to get you developing as soon as possible, while providing quality, in-depth content.
Within each chapter, I’ve included a collection of devices to help you build a firm understanding of Silverlight. The following list explains how each device helps along the journey:
In addition to these learning devices, my site http://10rem.net hosts some image assets and contains links to the code samples used in this book.
This book is intended for developers who want to create nontrivial applications using Microsoft Silverlight 5.
Though Silverlight provides numerous avenues for interactions with designers, this book primarily targets people who live and breathe inside Visual Studio. Team members in the integration role (those who take designs and implement in Silverlight) will also find the information valuable and useful.
This book assumes you have at least a passing familiarity with common web standards such as HTML, CSS, XML, and JavaScript. This content comes up primarily in integrating with the browser, but also to help draw parallels with other approaches.
In addition, and more importantly, this book assumes you have a background using the .NET Framework and Microsoft Visual Studio. Although I’ll be using C# as the primary development language, I won’t be reviewing the C# language or explaining basic programming constructs such as classes, methods, and variables.
Experience with previous versions of Silverlight isn’t required for this book.
This book provides ample opportunity for hands-on learning. But it also provides a great deal of flexibility by allowing you to learn the material without using the hands-on content or optional tools. You’ll find it equally valuable to read this book at the computer, on the train, or wherever else you happen to be.
If you want to get the greatest value out of this book and use the hands-on opportunities, the following tools are recommended:
You’ll find links to all of these tools at http://silverlight.net/GetStarted.
Developing for Silverlight is a large topic. I’ve endeavored to cover a bit of everything here, with special emphasis on topics useful to professional developers. To aid your journey through this book, I’ve broken it up into six parts and a set of appendixes.
Part 1 covers the most important concepts to understand when learning Silverlight. It begins with a brief introduction to Silverlight and a step-by-step “Hello World!” example. The remaining chapters in part 1 cover XAML, the application model, the plug-ins, HTML and browsers, out-of-browser applications, and the security model and elevated trust mode.
Part 2 covers the visible parts of Silverlight applications. In this part you’ll learn about rendering, layout, panels, transformations, mouse and keyboard input, text display and editing, controls, animation, UI styles, and custom controls and panels.
Most applications need to access data, whether it’s on the local machine or hiding behind a service on a remote server. Part 3 covers everything you need to know to work with all sorts of data in Silverlight, starting with binding, data controls, and input validation and finishing with SOAP services, RESTful services, XML, JSON, RSS, and WCF Duplex services.
Most visual elements in Silverlight are composed of graphics primitives. Part 4 starts off with working with graphics like lines and circles, and show you how to augment them using effects like blurs and drop shadows. You’ll even learn how to create your own effects and shaders. To round out the 2D content, part 4 also includes great information on working with bitmap graphics. The last two chapters in this part cover 3D graphics from the basics of points, meshes, lighting, and shading, all the way to creating your own frame-based animation system.
Silverlight is a client-side technology. Because of that, it makes sense to want to integrate more deeply with the computer and tap some of its capabilities. Part 5 covers cross-platform integration features like full-screen applications, windows, pop-ups, navigation, file access, and printing, as well as Windows-only features such as p-invoke and COM automation.
This book wraps up with a number of best practices you’ll want to apply once you get the basics under your belt. Specifically, you’ll learn about the MVVM (Model-View-ViewModel) pattern as well as customizing the installation and loading experience. Information on techniques for debugging applications rounds out this part.
There are six appendixes in the book. One is included in the print book; the others are available as a free download from the publisher's website at www.manning.com/Silverlight5inAction. These appendixes were originally written to be included as part of the print book, so they’re of the same quality as the rest of the book. Because of their relative niche appeal, they’ve been pulled out and made into downloadable chapters.
All the code used in this book is presented in a monospaced font like this. This code can be in one of a variety of languages; the language used is indicated at the beginning of the code block. For longer lines of code, a wrapping character may be used to be technically correct while forming to the limitations of a printed page. Annotations accompany many of the code listings and numbered cueballs are used if longer explanations are needed.
Longer listings of code examples appear under clear listing headers; shorter listings appear between lines of text.
The source code for all of the examples in the book is available for download from the publisher’s website at www.manning.com/Silverlight5inAction and from the author’s website at http://10rem.net.
The purchase of Silverlight 5 in Action includes free access to a private forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and other users. You can access and subscribe to the forum at www.manning.com/Silverlight5inAction. This page provides information on how to get on the forum once you’re registered, what kind of help is available, and the rules of conduct in the forum.
Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It isn’t a commitment to any specific amount of participation on the part of the author, whose contributions to the book’s forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions, lest his interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publisher’s web site as long as the book is in print.
In addition to the Author Online forum available on Manning’s website, you may also contact us regarding this book, or anything else, through one of the following avenues:
Pete Brown currently works for Microsoft helping to educate developers on all things XAML, as well as the .NET Micro Framework and programmable devices. Prior to joining Microsoft in 2009, Pete was an architect, engagement manager, and user experience designer at a consulting company in the Washington, DC, area, where he focused on Silverlight and WPF development. During that time he was also an International .NET Association (INETA) speaker, a Microsoft WPF MVP, and a Microsoft Silverlight MVP.
Pete enjoys writing, woodworking, electronics, programming, making things with no practical use, acquiring huge monitors, cooking processors, and spending time with his wife and two children at their home in Maryland.
Pete’s man cave…er…home office looks like a cross between a Commodore museum, a radio station, and Dexter’s lab (the one with Dee Dee as a sister, not the serial killer, honestly)!
Pete’s site and blog is at http://10rem.net. Drop him a line.
By combining introductions, overviews, and how-to examples, the In Action books are designed to help learning and remembering. According to research in cognitive science, the things people remember are things they discover during self-motivated exploration.
Although no one at Manning is a cognitive scientist, we are convinced that for learning to become permanent it must pass through stages of exploration, play, and, interestingly, retelling of what is being learned. People understand and remember new things, which is to say they master them, only after actively exploring them. Humans learn in action. An essential part of an In Action book is that it’s example driven. It encourages the reader to try things out, to play with new code, and explore new ideas.
There is another, more mundane, reason for the title of this book: our readers are busy. They use books to do a job or solve a problem. They need books that allow them to jump in and jump out easily and learn just what they want just when they want it. They need books that aid them in action. The books in this series are designed for such readers.