In fact, if you are just going to use some settable property of the “FIRST” TextBlock as the value of the second TextBlock.stroke, you don’t even need a converter function:
$(go.Node, ...,
$(go.TextBlock, "First Label", { name: "FIRST" }, ...,
new go.Binding("stroke", "color")), // based on data.color
$(go.TextBlock, "Second Label", ...,
new go.Binding("stroke", "stroke").ofObject("FIRST") // on 1st TextBlock.stroke
)
)
Note that element names (i.e. GraphObject.name), allowing one to call Panel.findObject, are scoped at each Part or each item Panel.
I was try to avoid set name property since there are many textblocks in a panel, and each textblock’s stroke is exactly related on its previous textblock, I was thought using findObject may cause some performance issue as the textblock list growth.