UMD.HCIL.Piccolo.PNode.AddChild C# (CSharp) Method

AddChild() public method

Add a node to be a new child of this node.
The new node is added to the end of the list of this node's children. If child was previously a child of another node, it is removed from that node first.
public AddChild ( PNode child ) : void
child PNode The new child to add to this node.
return void
		public virtual void AddChild(PNode child) {
			int insertIndex = ChildrenCount;
			if (child.Parent == this) {
				insertIndex--;
			}
			AddChild(insertIndex, child);
		}

Same methods

PNode::AddChild ( int index, PNode child ) : void

Usage Example

		/// <summary>
		/// Adds bounds handles to the given node.
		/// </summary>
		/// <param name="aNode">The node to isLocal bounds handles to.</param>
		public static void AddBoundsHandlesTo(PNode aNode) {
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateEastLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateWestLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthLocator(aNode)));
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthEastLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateNorthWestLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthEastLocator(aNode))); 
			aNode.AddChild(new PBoundsHandle(PBoundsLocator.CreateSouthWestLocator(aNode))); 	
		}
All Usage Examples Of UMD.HCIL.Piccolo.PNode::AddChild