Chapter 24. Creating panels and controls

 

This chapter covers

  • Creating a custom panel
  • Exploring measure and arrange layout steps
  • Creating a custom control
  • Supporting templating
  • Implementing visual states

The power of templating in Silverlight means we rarely have to create custom panels and controls. More often than not, an existing element provides the behavior we need and a custom template will provide the appearance. But there are times when you really need something that behaves differently than any of the stock panels or controls. For those cases, Silverlight provides a way for you to create your own fully featured panels and controls, supporting all the same things that the built-in ones support.

Custom panels enable you to create your own specialized layout algorithms. For example, you may want a panel that lays out its children using concentric circles rather than a box model. Implementing custom panels also has a nice educational benefit: they help you visualize and understand the layout process. Once you’ve created a few panels of your own, you’ll find you better understand how the built-in ones work, and can better debug issues.

24.1. Creating a custom panel

 
 
 

24.2. Creating a custom control

 

24.3. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage