Method GetNamedElementsRecursively
GetNamedElementsRecursively()
Retrieves all child elements that have a name, including those nested within other named elements.
public virtual IEnumerable<FrameworkElement> GetNamedElementsRecursively()
Returns
- IEnumerable<FrameworkElement>
An enumerable collection of FrameworkElement instances that represent the named child elements found in the logical tree.
Remarks
This method performs a recursive search through the logical children of the current element, yielding each child that has a non-empty name. It is useful for scenarios where you need to access named elements in a hierarchical structure.