Nhu Nguyen
Nhu Nguyen

Reputation: 874

Add data to ListView Items WPF

How do I add data to the WPF ListView items like Windows Forms?

Upvotes: 2

Views: 641

Answers (1)

Purplegoldfish
Purplegoldfish

Reputation: 5284

Using databinding you can bind the itemssource to something like an observable collection then have your items added to that.

This approach makes it fairly easy to manipulate the data once you get used to databinding as long as you have INotifyPropertyChanged implemented your listview will update when you call OnPropertyChanged().

Upvotes: 1

Related Questions