The concept of "attribute elements" in this section can be described in a bizarre sense.
1. WPF implements object modeling with tag elements, two types: Control and container, which are used to load content and behavior, such as Button, the latter such as window.
You can write this:
<Window >
<Button Width="100" Height="100">
<Image Source="tom.png" />
</Button>
</Window>
You can also do this:
<Window >
<Button Width="100" Height="100">
<TextBox Width="75">edit me</TextBox>
</Button>
</Window>
That is, the image property of the original button and the TextBox property are extracted as objects. This is because the button originated from a class: ContentControl, which knows how to generate all the controls it mounts.
2. In fact, the complete writing is this:
<Button Width="100" Height="100">
<Button.Content>
<Image Source="tom.png" />
</Button.Content>
</Button>
However, there can be no two controls within the,<button.content> label, which will display syntax errors, and can only be an attribute element-this time with a panel.
The window control has the same usage as the button, as shown in the following section.