Original: "Programming WPF" translation 5th Chapter 2. Inline styles
Each "can be styled" WPF elements have a Style property that can be set internally-using the XAML attribute - element syntax (discussed in the first chapter), such as example 5-4.
Example 5-4
<Buttonx:name= "Cell00" />
<Button.style>
<Style>
<Setter Property= "Button.fontsize"Value= "+" />
<Setter Property= "Button.fontweight"Value= "Bold" />
</Style>
</Button.style>
</Button>
Because we want to bundle the property values in our style, we have a STYLE element with two setter child elements , one for each property we want to set, such as FontSize and fontweight , all with a Button prefix that indicates the class that contains the property. The properties that apply to the style are dependency properties, which are described in chapter Nineth.
Because of the extra style syntax and because inline styles cannot be shared across elements, inline styles are in fact more input when setting properties. For this reason, inline styles are often used without naming styles.
"Programming WPF" translation 5th 2. Inline styles