I've got a Page class in my .edmx ADO.NET Entity Data Model file with with Parent and Children properties. It's for a hierarchy of Pages.
removed dead ImageShack link – ADO.NET Entity Framework Hierarchical Page Class
This is handled in my SQL database with a ParentId foreign key in the Page table bound to the Id primary key of that same Page table.
How do I display this hierarchy in a WPF TreeView?
Best Answer
I got this working with help from Abe Heidebrecht. Much thanks to him.
Here's my XAML...
Here's my Visual Basic code...
When the window loads, the root node and its children are queried from the database and inserted into the tree.
Each time a node is expanded, that node's children and grandchildren are queried from the database and inserted into the tree.