Click or drag to resize

VisualConnectTo(String, Visual, String, Boolean) Method

Connect the visual to another visual with the corresponding connector names. This connection replaces any existing connections on this or the other visual's connector, unless allowMultiple is true, in which case this connection is added to existing connections.

Namespace: Demo3D.Visuals
Assembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntax
C#
public virtual void ConnectTo(
	string connectorName,
	Visual other,
	string otherConnectorName,
	bool allowMultiple
)

Parameters

connectorName  String
The connector on this visual.
other  Visual
The other visual to connect to.
otherConnectorName  String
The name of the connector on the other visual to connect to.
allowMultiple  Boolean
If true, add connection to existing connections, if false then replace existing connections.
Example
C#
void ReplaceConnections(Visual visualA, Visual visualB)
{
    // Connect the "End" connector of visualA
    //    to the "Start" connector of visualB.
    // This replaces any existing connections.
    visualA.ConnectTo("End", visualB, "Start");
}

void AddToConnections(Visual visualA, Visual visualB)
{
    // Connect the "End" connector of visualA
    //    to the "Start" connector of visualB.
    // This adds to any existing connections because allowMultiple:true is specified.
    visualA.ConnectTo("End", visualB, "Start", allowMultiple:true);
}
See Also