GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoObject Class / OnParentChanged Method
This GoGroup value is the old value of Parent. The value will be null if the object did not belong to a group but is being added to one.
This GoGroup value is the new value of Parent. The value will be null if the object is being removed from a group.
In This Topic
    OnParentChanged Method
    In This Topic
    Called when this object's parent is changed.
    Syntax
    protected virtual void OnParentChanged( 
       GoGroup oldgroup,
       GoGroup newgroup
    )

    Parameters

    oldgroup
    This GoGroup value is the old value of Parent. The value will be null if the object did not belong to a group but is being added to one.
    newgroup
    This GoGroup value is the new value of Parent. The value will be null if the object is being removed from a group.
    Remarks
    When this object is being removed from its group, this method is called before the actual value of Parent is set to null. Otherwise this method is called after the parent has been changed. When this object is being removed from its group, its Layer will be set to null too. When this object is being added to a group, its Layer property will be set to be the same as its new parent's layer. Unlike GoDocument.Changed events, this method will be called even when this object is not part of a document, or when SuspendsUpdates is true. However, this method is not called upon undo or redo of a change of parent. By default this method does nothing. Any implementation of this method should not cause a change in parents or layers.
    See Also