VisualTreeHelperExtensionsFindVisualParentT Method

CVB.Net Documentation
Finds a parent of a certain type of a this item in the visual tree.

Namespace:  Stemmer.Cvb.Wpf
Assembly:  Stemmer.Cvb.Wpf (in Stemmer.Cvb.Wpf.dll) Version: 14.0.0.0
Syntax

public static T FindVisualParent<T>(
	this DependencyObject obj
)
where T : DependencyObject

Parameters

obj
Type: System.WindowsDependencyObject
A direct or indirect obj of the queried item.

Type Parameters

T
The type of the queried item.

Return Value

Type: T
The first parent item that matches the submitted type parameter. If no matching item can be found, a null reference is being returned.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference