Content Controls

Content controls are a specialized type of controls that are designed to hold (and display) a piece of content. Technically, a content control is a control that can contain a single nested element. The one-child limit is what differentiates content controls from layout containers, which can hold as many nested elements as you want.

As you learned in Chapter 3, all Silverlight layout containers derive from the Panel class, which gives the support for holding multiple elements. Similarly, all content controls derive from the ContentControl class. Figure 5-6 shows the class hierarchy.

images

Figure 5-6. The hierarchy of content controls ...

Get Pro Silverlight 5 in VB 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.