Click or drag to resize
Sandcastle Help File BuilderControlExtensionsParentElementOfTypeT Method
From the given starting element, this will work up the visual tree until it finds a parent element of the given type.

Namespace: SandcastleBuilder.WPF
Assembly: SandcastleBuilder.WPF (in SandcastleBuilder.WPF.dll) Version: 2014.11.22.0
Syntax
public static T ParentElementOfType<T>(
	this FrameworkElement element
)
where T : FrameworkElement

Parameters

element
Type: System.WindowsFrameworkElement
The starting element

Type Parameters

T
The parent element type to find

Return Value

Type: T
The parent element of the given type if found or null if not found

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. 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