Fast way to detect rectangles, which intersect with the given rectangle
See the question and my original answer on StackOverflowThis is can be done using Quadtrees. You can find a c# implementation here: Virtualized WPF Canvas (the quadtree code is not strictly related to WPF), also lots of info here: ZoomableApplication2: A Million Items and another implementation here: PriorityQuadTree