VisualTree.FindAscendant 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.
Overloads
FindAscendant(DependencyObject, Type) |
Find first visual ascendant control of a specified type. |
FindAscendant<T>(DependencyObject) |
Find first visual ascendant control of a specified type. |
FindAscendant(DependencyObject, Type)
Find first visual ascendant control of a specified type.
public static object FindAscendant (this Windows.UI.Xaml.DependencyObject element, Type type);
static member FindAscendant : Windows.UI.Xaml.DependencyObject * Type -> obj
<Extension()>
Public Function FindAscendant (element As DependencyObject, type As Type) As Object
Parameters
- element
- Windows.UI.Xaml.DependencyObject
Child element.
- type
- Type
Type of ascendant to look for.
Returns
Ascendant control or null if not found.
Applies to
FindAscendant<T>(DependencyObject)
Find first visual ascendant control of a specified type.
public static T FindAscendant<T> (this Windows.UI.Xaml.DependencyObject element) where T : Windows.UI.Xaml.DependencyObject;
static member FindAscendant : Windows.UI.Xaml.DependencyObject -> 'T (requires 'T :> Windows.UI.Xaml.DependencyObject)
<Extension()>
Public Function FindAscendant(Of T As DependencyObject) (element As DependencyObject) As T
Type Parameters
- T
Type to search for.
Parameters
- element
- Windows.UI.Xaml.DependencyObject
Child element.
Returns
T
Ascendant control or null if not found.