public void UpdateFlattenedTree() { if (ExpTree == null || ExpTree.Root == null) { FlattenedTree = null; return; } var ft = new ExpressionTreeTraversingCollection(); ft.UpdateRoot(ExpTree.Root); FlattenedTree = ft; }
void IDropTarget.Drop(IDropInfo dropInfo) { var target = dropInfo.TargetItem as IExpressionTreeNode; if (target == null) return; var source = dropInfo.Data as IExpressionTreeNode; if (source == null) return; if (source is PredicateNode && target is PredicateNode) { Tree.InjectInto(source, target); } else { throw new NotSupportedException(); } // todo: do this as XamlVirutalizingCollection var ft = new ExpressionTreeTraversingCollection(); ft.UpdateRoot(Tree.Root); FlattenedTree = ft; //FlattenedTree.UpdateRoot(Tree.Root); }