ArcFM Solution Developer Guide
TryFindParent<T> Method


The type of the queried item.
A direct or indirect child of the queried item.
Finds a parent of a given item on the visual tree.
Syntax
'Declaration
 
<System.Runtime.CompilerServices.ExtensionAttribute()>
Public Shared Function TryFindParent(Of T As System.Windows.DependencyObject)( _
   ByVal child As System.Windows.DependencyObject _
) As T
'Usage
 
Dim child As System.Windows.DependencyObject
Dim value As T
 
value = TreeHelper.TryFindParent(Of T)(child)
[System.Runtime.CompilerServices.Extension()]
public static T TryFindParent<T>( 
   System.Windows.DependencyObject child
)
where T: System.Windows.DependencyObject

Parameters

child
A direct or indirect child of the queried item.

Type Parameters

T
The type of the queried item.

Return Value

The first parent item that matches the submitted type parameter. If not matching item can be found, a null reference is being returned.
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

TreeHelper Class
TreeHelper Members

 

 


Send Comment