Mastering Visual Studio 2017
上QQ阅读APP看书,第一时间看更新

Property attribute syntax

Each element can have one or more properties. You can set the properties in XAML as an attribute. The syntax of it starts with the property name, an assignment operator and a value within quotes. For example, in the following code snippet, the first example defines a button element without specifying a property attribute whereas the other two elements have the attribute defined:

    <Button /> 
    <Button Content="Click Here" /> 
    <Button Content="Click Here" Background="Red" />