コード例 #1
0
 public void UpdateFlattenedTree()
 {
     if (ExpTree == null || ExpTree.Root == null)
     {
         FlattenedTree = null;
         return;
     }
     
     var ft = new ExpressionTreeTraversingCollection();
     ft.UpdateRoot(ExpTree.Root);
     FlattenedTree = ft;
 }
コード例 #2
0
        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);
        }