Edit

Share via


LogicalTree.FindParent<T>(FrameworkElement) Method

Definition

Find first logical parent control of a specified type.

public static T FindParent<T> (this Windows.UI.Xaml.FrameworkElement element) where T : Windows.UI.Xaml.FrameworkElement;
static member FindParent : Windows.UI.Xaml.FrameworkElement -> 'T (requires 'T :> Windows.UI.Xaml.FrameworkElement)
<Extension()>
Public Function FindParent(Of T As FrameworkElement) (element As FrameworkElement) As T

Type Parameters

T

Type to search for.

Parameters

element
Windows.UI.Xaml.FrameworkElement

Child element.

Returns

T

Parent control or null if not found.

Applies to