binding collection to treeview in wpf

It’s because you’re not setting the name in your Item class. The items are being added but because the name is blank, you can’t see anything.

public Item(string name)
{
    Name = name;
    Children = new ObservableCollection<Item>();
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top