1. One or more computer-storage media having computer-executable instructions embodied thereon for performing a method for providing a custom logical view of a set of user-interface elements (UI elements), the media comprising: analyzing the set of UI elements so as to construct a raw tree structure having a plurality of nodes, the nodes corresponding to respective UI elements of the set, the raw tree structure including a plurality of logical trees that are aggregated to appear as a single tree by providing a set of referential links between a first node of a first logical tree of the plurality of logical trees and a second node of a second logical tree of the plurality of logical trees; identifying a subset of the nodes that satisfy one or more conditions that were received from a requesting component and that are associated with the function of the UI elements; and communicating to a requesting component a custom representation of the raw tree structure that includes the subset of the nodes.