Chapter 5. Controls

While Silverlight 1.0 focused on many of the core features of Silverlight such as XAML, Silverlight 2 took the platform to the next level by adding a managed-code framework, and a benefit of that is the ability to introduce controls to the platform. Silverlight 3 continues that trend by adding several new controls.

For developers who need to be productive, controls provide encapsulated reusable chunks of behavior and a UI that make it easy to add common user interface patterns to your application. Rather than being responsible for drawing every minor detail and coding every behavior, controls allow you to focus more on the specific requirements of your application and less on developing those lower-level capabilities.

This chapter will introduce you to many of the common and more complex controls that are included in the default Silverlight 3 toolbox. The chapter is not intended to be an in-depth guide to every single control included in Silverlight 3, simply because many of the controls are fairly self-explanatory (e.g., Checkbox). Additionally, some controls such as MediaElement are discussed in detail in other, more applicable chapters in this book.

Text Input

Silverlight 3 includes a TextBox control, which provides the same basic text input capabilities you are used to receiving from the HTML <input> element. The control offers single-format, multiline input capabilities with automatic text wrapping, as well as integration with the clipboard. An undo/redo stack ...

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.