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

Data Templates

A data template is a chunk of XAML markup that defines how a bound data object should be displayed. Two types of controls support data templates:

  • Content controls support data templates through the ContentTemplate property. The content template is used to display whatever you've placed in the Content property.
  • List controls (controls that derive from ItemsControl) support data templates through the ItemTemplate property. This template is used to display each item from the collection (or each row from a DataTable) that you've supplied as the ItemsSource.

The list-based template feature is based on content control templates: each item in a list is wrapped by a content control, such as ListBoxItem for the ListBox, ComboBoxItem for ...

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