I have a table of categories in my database, as below.
Category
- categoryId
- name
- parentId
The parentId links back to itself to form hierarchy.
How do I bind it to a combobox in WPF so that the child elements are indented as appropriate for each level?
XAML:
C#:
Be sure to have
int Levelandstring Nameproperties in your class