As we know XAML allows us to define properties of elements using the attribute syntax. It means that,for example, if we want to specify the content/background colour of button control than we can specify it using attributes as shown below:
<Button Content="Attribute Style" Background = "Yellow"/>
However there might be a challenge using this syntax. Consider a scenario where we want to display a rectangle inside the button. In this case it would not be possible to define a rectangle in the content attribute.This will be due to string restrictions of attribute syntax. To overcome this kind of scenarios, XAML provides the Property elements.
The syntax of property element is
<Button> <Button.Content> <Rectangle Height="40" Width="40" Fill="Yellow"/> </Button.Content> </Button>
Please note how beautifully the rectangle tag is given as child tag for Button.