T
the type UIElement or a subclass; frequently typeof(Node)
Northwoods.GoSilverlight 1.1.3 Assembly
FindAncestor<T> Method
See Also  Send Feedback
Northwoods.GoXam Namespace > Part Class : FindAncestor<T> Method

elt
This static method takes a UIElement and walks up the visual tree looking for an element of type T.

Syntax

Visual Basic (Declaration) 
Public Shared Function FindAncestor(Of T As UIElement)( _
   ByVal elt As UIElement _
) As T
C# 
public static T FindAncestor<T>( 
   UIElement elt
)where T: UIElement

Parameters

elt

Type Parameters

T
the type UIElement or a subclass; frequently typeof(Node)

Return Value

the elt if it is of type T, or else one of its parent visuals of that type, or else null if no such element was found

See Also