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
From the course: Microsoft XAML: 2 Content and Properties
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What does content mean in XAML?3m 41s
-
Use children elements as content7m 5s
-
Install the dotPeek utility1m 16s
-
How each element defines a content property5m 28s
-
Content as an object in XAML6m 32s
-
Content as an object in code5m 33s
-
Visual content in panels4m 59s
-
Content as a list in XAML3m 53s
-
Content as a list in code3m 6s
-
Content as a dictionary in XAML4m 53s
-
Content as a dictionary in code1m 25s
-
-
-