Here’s some basic code to create a ListViewGroup, add it to the Groups collection of an existing ListView (listApplications), and then create a ListViewItem and add it to the ListviewGroup::
ListViewGroup AppCategory1 = new ListViewGroup("Cat1", HorizontalAlignment.Left);
AppCategory1.Tag = "ThereIsAnAppForThat";
listApplications.Groups.Add(AppCategory1);
ListViewItem lvi = new ListViewItem();
//Now, which way of assigning a ListViewItem to a group is preferred? This way:
lvi.Group = AppCategory1;
//or this way:
AppCategory1.Items.Add(la);
?
According to MSDN ListViewGroup.Items documentation
So, there is no significant difference between these approaches.