Esempio n. 1
0
        /// <summary>
        /// Add a node to the VisualNodeView children of this control. The position of the
        /// new child is specified by the top and left arguments of the method.
        /// </summary>
        protected void AddNewVisualNodeChild(double left, double top)
        {
            var child = new VisualNodeView();

            _visualNodeChildren.Add(child);
            child.Width  = ActualWidth / 4;
            child.Height = ActualHeight / 4;
            cvsMain.Children.Add(child);
            Canvas.SetTop(child, top);
            Canvas.SetLeft(child, left);
        }
Esempio n. 2
0
 /// <summary>
 /// Remove the specified child from the VisualNodeView children of this control.
 /// </summary>
 /// <remarks>
 /// To remove the correct child, the method searches the children for a child whose
 /// _guid field matches the _guid field of the input node.
 /// </remarks>
 protected void RemoveVisualNodeChild(VisualNodeView child)
 {
     _visualNodeChildren.RemoveAll(x => x._guid == child._guid);
 }