LogicalTree.FindParent<T>(FrameworkElement) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.