T
the type of element being searched for
Northwoods.GoWPF 1.3.5 Assembly
FindElementsNear<T> Method
See Also  Send Feedback
Northwoods.GoXam Namespace > DiagramPanel Class : FindElementsNear<T> Method

p
a Point in model coordinates
dist
the distance, in model coordinates
pred
This is a predicate that is given an element of type T; if the predicate returns true, this method includes that element in its results.
layers
The kinds of Layers to search in. For example, if you are looking for Nodes, using the value SearchLayers.Nodes, this will speed up the search by ignoring layers containing Links.
Find elements that are within a distance of a point.

Syntax

Visual Basic (Declaration) 
Public Function FindElementsNear(Of T As Visual)( _
   ByVal p As Point, _
   ByVal dist As Double, _
   ByVal navig As Func(Of Visual,T), _
   ByVal pred As Predicate(Of T), _
   ByVal layers As SearchLayers _
) As IEnumerable(Of T)
C# 
public IEnumerable<T> FindElementsNear<T>( 
   Point p,
   double dist,
   Func<Visual,T> navig,
   Predicate<T> pred,
   SearchLayers layers
)where T: Visual

Parameters

p
a Point in model coordinates
dist
the distance, in model coordinates
navig
This is a function that is given an element at the given point and returns an element of type T to be considered by the predicate pred. Typically the function will find the ancestor Part or Node.
pred
This is a predicate that is given an element of type T; if the predicate returns true, this method includes that element in its results.
layers
The kinds of Layers to search in. For example, if you are looking for Nodes, using the value SearchLayers.Nodes, this will speed up the search by ignoring layers containing Links.

Type Parameters

T
the type of element being searched for

Return Value

an element of type T, or null if none is found

Requirements

See Also

© 2012 All Rights Reserved.