Invalid XAML TypeArgument syntax
This error occurs when a TypeArguments attribute is specified incorrectly. The TypeArguments attribute declares the parameter type for a generic class. For more information, see x:TypeArguments Directive.
This error is raised when the file is a valid XML document, but is not a well-formed XAML document.
Error ID: XAML0425
Note
This error message also applies to the Silverlight Designer.
To correct this error
- Ensure that the type specified by the value of the TypeArguments attribute is mapped, is in scope, and is spelled correctly.
To correct this error
- Ensure that you are not missing an assembly reference and that all referenced assemblies have been built.
Example
The following code example shows how to use the TypeArguments attribute to declare a PageFunction<T> which is parameterized by the String type.
<PageFunction
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
x:Class="CSharp.TaskPageFunction"
x:TypeArguments="sys:String">
<Grid>
</Grid>
</PageFunction>