Click or drag to resize

VisualConnectTo(String, Visual, String) 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.

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
)

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.
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