How do you add sub-items to a ListView
? I need to generate everything dynamically, but every example I\'ve found uses XAML.
Non-WPF was so simple:
The "WPF way" would be to bind your listview to a collection that represents the data you want to display. Then add objects containing data to that collection. You almost never should have to deal with adding ListViewItems
to your list manually as you are planning to do. I could come up with an example but there's many threads here on SO already that solve exactly this problem: