O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required