ExtensionMethods.FindDescendantReverse<T>(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.
Helper method that finds the last descendant of a given Type in the visual tree.
USE SPARINGLY.
This method walks all the tree in reverse order until a result is found. 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 T FindDescendantReverse(System::Windows::DependencyObject ^ obj);
public static T FindDescendantReverse<T> (this System.Windows.DependencyObject obj) where T : class;
static member FindDescendantReverse : System.Windows.DependencyObject -> 'T (requires 'T : null)
<Extension()>
Public Function FindDescendantReverse(Of T As Class) (obj As DependencyObject) As T
Type Parameters
- T
The type of descendant to find.
Parameters
- obj
- DependencyObject
The object at which to begin searching.
Returns
The last descendant of type T in the children of obj, or null if no descendant is found.