Click or drag to resize

VisualConnectTo Method (String, Visual, String, Boolean)

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: 15.0.2.11458
Syntax
C#
public virtual void ConnectTo(
	string connectorName,
	Visual other,
	string otherConnectorName,
	bool allowMultiple
)

Parameters

connectorName
Type: SystemString
The connector on this visual.
other
Type: Demo3D.VisualsVisual
The other visual to connect to.
otherConnectorName
Type: SystemString
The name of the connector on the other visual to connect to.
allowMultiple
Type: SystemBoolean
If true, add connection to existing connections, if false then replace existing connections.
Examples
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