DependencyObjectExtensions.FindAscendants(DependencyObject) 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 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
All the descendant Windows.UI.Xaml.DependencyObject instance from element
.