ComponentOne Basic Library for WPF and Silverlight
GetFirstParent Method (VTreeHelper)


C1.WPF Namespace > VTreeHelper Class : GetFirstParent Method
The visual whose parent is returned.
The System.Collections.Generic.IList`1 list of types to search for.
The visual representing the end point of search.
Returns a System.Windows.DependencyObject value that represents the first parent of the visual object which type is one of the specified tyles. Method looks up the visual tree until the desired parent element is found or parent element is equal to the specified endObject.
Syntax
'Declaration
 
Public Shared Function GetFirstParent( _
   ByVal reference As System.Windows.DependencyObject, _
   ByVal types As System.Collections.Generic.IList(Of Type), _
   ByVal endObject As System.Windows.DependencyObject _
) As System.Windows.DependencyObject
'Usage
 
Dim reference As System.Windows.DependencyObject
Dim types As System.Collections.Generic.IList(Of Type)
Dim endObject As System.Windows.DependencyObject
Dim value As System.Windows.DependencyObject
 
value = VTreeHelper.GetFirstParent(reference, types, endObject)
public static System.Windows.DependencyObject GetFirstParent( 
   System.Windows.DependencyObject reference,
   System.Collections.Generic.IList<Type> types,
   System.Windows.DependencyObject endObject
)

Parameters

reference
The visual whose parent is returned.
types
The System.Collections.Generic.IList`1 list of types to search for.
endObject
The visual representing the end point of search.

Return Value

The parent of the visual.
See Also

Reference

VTreeHelper Class
VTreeHelper Members