I have a requirement to convert a flat structure to hierarchical. My architecture is as follows: 

I get the levels and the parents for each item and want to add this structure to an observable collection to load menu control in my xaml

=======

Item1
=====

--Childitem1
============

--ChildItem2
============

Item2
=====

--ChildItem3
============

 ----------ChildItem7
=====================

--ChildItem4
============

 ----------ChildItem8
=====================

Item3
=====

--ChildItem5
============

--ChildItem6
============

---------------ChildItem9
=========================

What is an easy way to do this in C#?