I just want to create a treeview using binding in wpf. I have a class (ClassRoot) as root and I have 3 properties in root class of type ClassA, ClassB, ClassC like the following,
class ClassRoot
{
public ClassA propClassA { get; set; }
public ClassB propClassB { get; set; }
public ClassC propClassC { get; set; }
}
each class having its own properties. It may have properties of type List or Enum, etc., like below,
class ClassA
{
public string Name { get; set; }
//Here ListOfValues is an enum
public ListOfValues listValues { get; set; }
public List<string> stringValues { get; set; }
}
like the above class, ClassB and ClassC also having the same structure. I want to show this in WPF treeview like the following,
- ClassRoot
- ClassA
- Name
- listValues
- stringValues
- ClassB
- Name
- listValues
- stringValues
- ClassA
each properties should be editable, properties of type List or Enum should be represented as ComboBox in treeview.
I can use hierarchical data template, but I'm confusing to implement this multi level hierarchy.
How can I proceed with this?
Thank you,