From the course: Microsoft XAML: 2 Content and Properties

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Content as a list in XAML

Content as a list in XAML

From the course: Microsoft XAML: 2 Content and Properties

Start my 1-month free trial

Content as a list in XAML

- [Instructor] WPF and the other XAML frameworks have an assortment of controls optimized for displaying a list of data. They are members of the Items Control family. Here are some of the common ones available in WPF: the list box, the combo box, and the list view. As you can see, they all derive from the Items Control base class. It's in this class that the content property is defined. All these controls excel at showing data to the user and allowing the user to select one or more items shown in the list. That's why they derive from the selector class. That gives them the selectability. These controls support direct addition of content to the list, and they support data binding and data templates too. In this video, I'm showing how to add items to the list in the direct addition way. Here's how you do that. I'll go over to the main window. I have to find the list box here, and you can see that all I have to do is add elements between the beginning and ending list box tags. So I've…

Contents