Custom Layout Containers

Although Silverlight has a solid collection of layout containers, it can't offer everything. The developers of Silverlight left out many more specialized layout containers to keep the Silverlight download as lean as possible.

However, there's no reason you can't create some layout containers of your own. You simply need to derive a custom class from Panel and supply the appropriate layout logic. And if you're ambitious, you can combine the layout logic of a panel with other Silverlight features. For example, you can create a panel that handles mouse-over events to provide automatic drag support for the elements inside (like the dragging example shown in Chapter 4), or you can create a panel that displays its children ...

Get Pro Silverlight 5 in VB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.