private void AddItemRecursively(HierachicalDataGridItemWrapper wrapper)
 {
     Items.Add(wrapper);
     wrapper.PropertyChanged += OnWrapperPropertyChanged;
     foreach (var child in wrapper.Children) {
         AddItemRecursively(child);
     }
 }
 private static HierachicalDataGridItemWrapper CreateRecursively(IHierarchicalDataGridItem item, int parentLevel)
 {
     var wrapper = new HierachicalDataGridItemWrapper(item) {
         Level = parentLevel + 1
     };
     foreach (var childItem in item.Children) {
         var childWrapper = CreateRecursively(childItem, wrapper.Level);
         wrapper.Children.Add(childWrapper);
     }
     return wrapper;
 }