When using resources such as brushes, templates and styles in WPF, they can be specified either as StaticResources
Suppose you have this nested Style dictionary. LightGreen is at the root level while Pink is nested inside a Grid.
In view:
StaticResource will render the button as LightGreen, the first value it found in the style. DynamicResource will override the LightGreen button as Pink as it renders the Grid.
StaticResource
DynamicResource
Keep in mind that VS Designer treats DynamicResource as StaticResource. It will get first value. In this case, VS Designer will render the button as LightGreen although it actually ends up as Pink.
StaticResource will throw an error when the root-level style (LightGreen) is removed.