GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoView Class / NewLinkPrototype Property
In This Topic
    NewLinkPrototype Property
    In This Topic
    Gets or sets a GoObject that is copied when a new link is created.
    Syntax
    [Category("Behavior")]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    [Description("An instance of a link to be copied when linking.")]
    public virtual GoObject NewLinkPrototype {get; set;}

    Property Value

    The GoObject must implement the IGoLink interface with a no-argument constructor. The value must not be null, either. You can disable user-drawn links by setting AllowLink to false instead.
    Remarks

    The CreateLink method uses this property to determine what kind of link to create. It is also used by the GoToolLinking tool's CreateTemporaryLink method.

    With this property, you can more easily initialize the properties of each new link to be created, by setting the properties once on this prototype object, rather than each time in a LinkCreated event handler. For coding purposes, it may be more convenient to refer to either the NewGoLink property to set GoLink properties if this object is a GoLink, or to the NewGoLabeledLink property to set GoLabeledLink properties, if this object is a GoLabeledLink.

    See Also