Partager via


ExtensionMethods.FindDescendants<T>(DependencyObject) Method

Definition

Find all visual descendants of this dependency object of a particular type.

USE SPARINGLY.

This method walks the entire tree. Use of this method on large trees or excessively will introduce a performance hit.

public:
generic <typename T>
 where T : class[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ FindDescendants(System::Windows::DependencyObject ^ obj);
public static System.Collections.Generic.IEnumerable<T> FindDescendants<T> (this System.Windows.DependencyObject obj) where T : class;
static member FindDescendants : System.Windows.DependencyObject -> seq<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function FindDescendants(Of T As Class) (obj As DependencyObject) As IEnumerable(Of T)

Type Parameters

T

Parameters

Returns

Applies to