When you need to define a collection of elements to the parent root, the Collection syntax is used to make it easy to read. For example, to add elements inside StackPanel, we use its Children property, as shown in the following code:
<StackPanel>
<StackPanel.Children> <Button Content="Button One" /> <Button Content="Button Two" /> </StackPanel.Children> </StackPanel>
This can be also written as follows, and the parser knows how to create and assign the elements to StackPanel:
<StackPanel> <Button Content="Button One" /> <Button Content="Button Two" /> </StackPanel>