SplicesIntoLink

Hi

I have set go:Part.DropOntoBehavior="SplicesIntoLink" in my go:LinkPanel but its not working. Nothing happens when dropping nodes on links. What can be the problem?
Regards
Henrik

Did you enable the behavior by setting DraggingTool.DropOntoEnabled to true?
You can see examples of this in the demo.

Ahh, just figured it out. Thanks!

Hi again,

I need to cutomize the behavior of DropOnTo and have looked at the Piping sample.
I get error on line:
Link overlink = this.Diagram.Panel.FindElementAt(pt, Part.FindAncestor, p => ConsiderDragOver(pt, p), SearchLayers.Links);
or in my code (VB):
Dim overlink As Link = Me.Diagram.Panel.FindElementAt(Of Link)(pt, Part.FindAncestor(Of Link), Function(p) ConsiderDragOver(pt, p), SearchLayers.Links)
The error message is:
Argument not specified for parameter 'elt' of 'Public Shared Function FindAncestor(Of T As System.Windows.Media.Visual)(elt As System.Windows.Media.Visual) As T'.
/Henrik

Hmmm, I’m not familiar enough with VB to know how to specify functional parameters that are static generic methods.

In C# the second argument to FindElementAt is the expression “Part.FindAncestor”.
This expression returns a method that takes a Visual as its single argument and returns a Link.

Apparently in VB “Part.FindAncestor(Of Link)” looks like a regular function call that is missing its argument list. Maybe you can prefix that with “AddressOf”? I’m just guessing.

For anyone else using VB, this works:
Dim elt = Me.Diagram.Panel.FindElementAt(Of UIElement)(Pt, Function(e) e, Nothing, SearchLayers.Links)
If Not elt Is Nothing Then
Dim link As Link = Part.FindAncestor(Of Link)(elt)
End If
/Henrik