GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoObject Class / Initializing Property
In This Topic
    Initializing Property (GoObject)
    In This Topic
    Gets or sets whether this object is in the process of being initialized.
    Syntax
    [Browsable(false)]
    public bool Initializing {get; set;}
    Remarks

    This property is provided as a standard way to indicate that the object is not yet completely initialized, thereby allowing some methods to optimize their behavior.

    Most of the simpler objects do not need to use this flag. More complicated objects such as GoGroups use this flag during construction and initialization to avoid repeated work in methods such as GoGroup.LayoutChildren. So if you temporarily set this property to true during the initialization of a complex or large node, be sure to call LayoutChildren(null) after you set it back to false.

    This property is temporarily set to true in some constructors or initialization methods, in GoGroup.GoGroup.CopyObject when calling CopyChildren, and during an undo or a redo when calling ChangeValue.

    Property setters that have public side-effects (besides just changing the value of a field or other internal state) should not do those side-effects when this property is true. This can be important in avoiding unwanted side-effects during undo or redo.

    Setting this property does not call Changed or raise any Changed events.

    See Also