We're a friendly computing community, bustling with knowledgeable members to help solve your tech questions.Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.In the markup (XAML), we define a View for the List View, using the List View. We set it to a Grid View, which is currently the only included view type in WPF (you can easily create your own though! The Grid View is what gives us the column-based view that you see on the screenshot.
The Data Item property is always always null, when I need it.
The Header property is used to specify the text that we would like to show for the column and then we use the Display Member Binding property to bind the value to a property from our User class.
Using the Display Member Binding property is pretty much limited to outputting simple strings, with no custom formatting at all, but the WPF List View is much more flexible than that.
By specifying a Cell Template, we take full control of how the content is rendered within the specific column cell.
The Grid View Column will use the Display Member Binding as its first priority, it it's present.