StaticResource markup extension accepts a single parameter representing the key to the item in a resource dictionary. But that item doesn’t have to be inside the current element’s resource dictionary. It could be in any logical parent’s collection, or even in application-level or system-level resource dictionaries.
The markup extension class implements the ability to walk the element tree to find the item. It first checks the current element’s
Resources collection (its resource dictionary). If the item is not found, it checks the parent element, its parent, and so on until it reaches the root element. At that point, it checks the
Resources collection on the
Application object. If it is not found there, it checks a collection ...