public override void ElementAdded(ElementAddedEventArgs e)
        {
            NodeShapeReferencesNestedChildren con = e.ModelElement as NodeShapeReferencesNestedChildren;

            if (con != null)
            {
                NodeShape childShape  = con.ChildShape;
                NodeShape parentShape = con.ParentShape;

                if (childShape != null && parentShape != null)
                {
                    childShape.ResizeParentIfRequired();
                }
                else
                {
                    con.Delete();
                }
            }
        }