Share via


Closing tag for element '<{0}>' was not found

An opening tag was not matched by a corresponding closing tag. This error may appear with Expected '{0}' and Character sequence '{0}' was not expected at this location.

This error is raised when the XAML file contains lexical elements that are not valid in XML.

Error ID: XAML0305

To correct this error

  • Ensure that all opening tags have matching closing tags.

Example

The following code example shows an opening tag which is correctly matched by a closing tag. Comment out the </Button> tag to raise error XAML0305.

<Button>
    OK
    <!-- Comment out the following line to raise error XAML0305. -->
</Button>

See Also

Concepts

XAML Errors and Help

Other Resources

XAML