Peter McGrattan has a post which presents an early prototype of ‘LINQ to Visual Tree’ for Silverlight 2 and WPF applications.
The ultimate goal is to provide applications with the ability to quickly and easily query the Silverlight 2 or WPF Visual Tree via LINQ to Objects.
The prototype provides this functionality by enabling enumeration of an application’s in-memory Visual Tree through the IEnumerable<T> interface. This is distinct to implementing a custom query provider: the prototype does not implement IQueryable<T> or execute and translate expression trees.
This post demonstrates the basics so far and makes the prototype available for download, it’s aim is to get feedback and ideas on how the simple API can be improved.