Visual Basic (Declaration) | |
---|---|
Protected Overridable Function FindLinkablePort() As FrameworkElement |
C# | |
---|---|
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.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.