DependencyObjectExtensions.FindAscendants(DependencyObject) Method

Definition

Find all ascendant elements of the specified element. This method can be chained with LINQ calls to add additional filters or projections on top of the returned results.

This method is meant to provide extra flexibility in specific scenarios and it should not be used when only the first item is being looked for. In those cases, use one of the available FindAscendant<T>(DependencyObject) overloads instead, which will offer a more compact syntax as well as better performance in those cases.

public static System.Collections.Generic.IEnumerable<Windows.UI.Xaml.DependencyObject> FindAscendants (this Windows.UI.Xaml.DependencyObject element);
static member FindAscendants : Windows.UI.Xaml.DependencyObject -> seq<Windows.UI.Xaml.DependencyObject>
<Extension()>
Public Iterator Function FindAscendants (element As DependencyObject) As IEnumerable(Of DependencyObject)

Parameters

element
Windows.UI.Xaml.DependencyObject

The root element.

Returns

IEnumerable<Windows.UI.Xaml.DependencyObject>

All the descendant Windows.UI.Xaml.DependencyObject instance from element.

Applies to