MSDN Library

Invalid XAML TypeArgument syntax

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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 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.

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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    x:Class="CSharp.TaskPageFunction"
    x:TypeArguments="sys:String">
    <Grid>
    </Grid>
</PageFunction>


Show:
© 2016 Microsoft