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

Items Controls

Controls that wrap collections of items generally derive from the ItemsControl class. Silverlight provides four list-based controls. You'll take a look at the ListBox, the ComboBox, and the TabControl in this section. You'll explore the TreeView in Chapter 21.

The ItemsControl class fills in the basic plumbing that's used by all list-based controls. Notably, it gives you two ways to fill the list of items. The most straightforward approach is to add them directly to the Items collection, using code or XAML. This is the approach you'll see in this chapter. However, if you need to display a dynamic list, it's more common to use data binding. In this case, you set the ItemsSource property to the object that has the collection of data ...

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