Unlike other objects placed in a
Resources collection, you can omit the
x:Name from a
Style! If you do this, the target type of the
Style (for example,
typeof(Button)) is used as the key in the
ResourceDictionary. This is handy, because it causes the
Style to be implicitly applied to all elements of that target type within the same scope. This is typically called a typed style or implicit style as opposed to a named style.
The scope of a typed
Style is determined by the location of the
Style resource. For example, it would implicitly apply to all relevant elements in a
Page if it’s added to the
Resources collection or all relevant elements in the app if it’s added to
Resources collection. The following ...