It was a looooooong time since I did a winform desktop application in .Net and I wanted to do some selections based on listboxes. The problem is that any item I select in a listbox also changes the selection of the other listboxes bound to the same data. I tried to find people who have had the same problem but couldn't find any so I guess I'm doing something fundamentally wrong. Anyone have any hints? See below for the basic code.
Class for handling data (to which I later use as DataSource in listboxes).
public class Registry
{
public ICollection<Data.Vertice> Vertices { get; set; } = new List<Data.Vertice>();
}
How I set the data source to a listbox
listBox1.DataSource = null;
listBox1.DataSource = _registry.Vertices;
listBox1.DisplayMember = "Title";