0

I'm trying to learn how to use the WPF ListViewBoxes in VB.Net.

I can add items to it, as long as there is only one column, by using this:

listview.Items.Add(item)

However, now that I've added more columns I can't figure out how to add separate items to each column. I've tried using arrays and ListViewItems, but I can't seem to figure it out. I've read about bindings, but can only seem to find documentation for c#.

This is probably easy and I'm missing something obvious, but how is it done?

Chris
  • 358
  • 1
  • 14
  • item.Subitem.Add(). Subitem goes to right (column), item goes down (row). – CruleD Oct 21 '18 at 16:48
  • 1
    This is a very good tutorial on WPF. It covers most of the controls. https://wpf-tutorial.com/listview-control/introduction/ – Mary Oct 21 '18 at 17:01
  • @CruleD Using `list1.Items.Add("Test")` then `list1.Items.Item(0).Subitem.Add("test2")` gives the error "Public member 'Subitem' on type 'String' not found." – Chris Oct 21 '18 at 17:40
  • 3
    @CruleD : OP is using WPF, not WinForms. – Visual Vincent Oct 21 '18 at 17:52

0 Answers0