An AlternateContent element can contain only one Fallback element

This error occurs when the AlternateContent element has more than one child Fallback elements.

This error is raised when the file is a valid XML document, but is not a well-formed XAML document.

Error ID: XAML0411

Note

This error message also applies to the Silverlight Designer.

To correct this error

  • Remove all except one of the child Fallback elements from the AlternateContent element.

Example

The following code example shows how to define fallback content with the AlternateContent element. Only one Fallback element is declared.

        <DockPanel xmlns:mc='https://schemas.openxmlformats.org/markup-compatibility/2006'
        xmlns:v1='assembly.v1'
        xmlns:v2='assembly.v2'
        mc:Ignorable="v2" >

            <mc:AlternateContent>
                <mc:Choice Requires='v2'>
                    <Button Content='V2' />
                </mc:Choice>
                <mc:Fallback>
                    <Button Content='V1'/>
                </mc:Fallback>
            </mc:AlternateContent>

        </DockPanel>

See Also

Concepts

XAML Errors and Help

Other Resources

XAML in WPF

Markup Compatibility (mc:) Language Features