GoXam for WPF v3
FindLinkablePort Method
Northwoods.GoXam.Tool Namespace > LinkingTool Class : FindLinkablePort Method
Return the element at the mouse-down point, if it is part of a node and if it is valid to link with it.
Syntax
protected virtual FrameworkElement FindLinkablePort()

Return Value

If the Direction is LinkingDirection.Either or LinkingDirection.ForwardsOnly, this checks the element and its parent Northwoods.GoXam.Node by calling IsValidFrom. If the Direction is LinkingDirection.Either or LinkingDirection.BackwardsOnly, this checks the element and its parent Northwoods.GoXam.Node by calling IsValidTo. In either case finding a matching port will return that port and set LinkingBaseTool.Forwards in the appropriate direction. Otherwise this will return null.
Remarks

If StartElement is non-null, it starts it search for a linkable "port" element at that element. The element may itself be a valid element to draw from or to. If StartElement is null, it finds the FrameworkElement at the Northwoods.GoXam.Diagram.FirstMousePointInModel.

Both CanStart and DoActivate call this method, although the latter only does so if StartPort is null.

See Also

Reference

LinkingTool Class
LinkingTool Members