FRBDK/Glue/Glue/Utilities/LinqToVisualTree.cs
/// <summary>
/// Applies the given function to each of the items in the supplied
/// IEnumerable.
/// </summary>
Applies the given function to each of the items in the supplied
IEnumerable.
Applies the given function to each of the items in the supplied IEnumerable .
private static IEnumerable<DependencyObject> DrillDown(this IEnumerable<DependencyObject> items,
            Func<DependencyObject, IEnumerable<DependencyObject>> function)
        {
            foreach (var item in items)
            {
                foreach (var itemChild in function(item))
                {
                    yield return itemChild;
                }
            }
        }
private static IEnumerable < DependencyObject > DrillDown ( this IEnumerable < DependencyObject > items , Func < DependencyObject , IEnumerable < DependencyObject > > function ) { foreach ( var item in items ) { foreach ( var itemChild in function ( item ) ) { yield return itemChild ; } } }
Applies the given function to each of the items in the supplied
IEnumerable.
Applies the given function to each of the items in the supplied IEnumerable .
IEnumerable<DependencyObject>
this
function
Func<DependencyObject, IEnumerable<DependencyObject>>