Changes

XAML Best practices

115 bytes added, 24 July
/* Implicit and Explicit Styling */
[[File:Performance_ImplicitStyling.jpg]]
* The above is an example of a localized ResourceDictionary used to avoid repeatedly customizing similar controls. In this example, all Labels within the StackPanel will inherit the defined style.* By not assigning an x:Key to the stylein the Grid.Resources, it will be used as the Implicit style for all Labels within that StackPanel unless a Style is assigned to them.* On * All Labels within the other handStackPanel will inherit the defined style, Labels with except for "The result is:", which is given an Explicit explicit style attribute will completely ignore any Implicit styling, overriding the inherited implicit one.** If no Explicit style is assigned, the Implicit style will be assigned first, and will be overwritten by any defined attributes, like TextColor in this the above example.
* The localized Style definitions in this StackPanel will be passed down to all controls contained within it, no matter how deep the nesting goes.
* The BasedOn attribute can be used to create a sub-style based on another existing style. However, the TargetType must always match.
<br>
 
[[Category:Pages with broken file links|XAML Best practices]]
[[Category:XAML|XAML Best practices]]
==== Content Templating ====
511
edits