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
About the Author
About the Reviewers

Creating user controls

Silverlight, being a rich UI framework, provides us with many controls ready to be used out of the box. But, no matter how rich the toolbox may be, there will come a time when you wish to create your own controls. Creating your own controls in Silverlight can be done by creating either a user control or a custom control. As creating the user controls is easier than creating the custom controls, we will introduce this method first.

A user control, in its core, is nothing more than a combination of existing controls that can be reused throughout your application. Once we learn about dependency properties later on in the book, we'll see how user controls can be extended with data binding and templating.

Creating your first user control

To walk you through creating your first user control, we will create a simple control that combines a TextBlock control and a Button control. Each time the button is clicked, the TextBlock control's text will indicate the number of clicks...