#538 – XAML End Tags Are Automatically Added as Needed in Blend
April 17, 2012 Leave a comment
When you first add an element to your user interface in Blend using one of the buttons on the tools panel, the corresponding XAML element does not typically hand an end tag.
For example, in the image below, we have a StackPanel element without an end tag (<StackPanel/>), rather than paired with an end tag (<StackPanel></StackPanel>).
If you now add a child element to the StackPanel using one of the buttons on the tools panel, Blend will automatically add the required end tag.
If you later delete the Button using the Objects and Timeline panel, removing all child elements from the StackPanel, the end tag is automatically removed.