<![CDATA[Dundas Support Zone - XAML Error: xClassCanOnlyBeUsedOnLoadComponent]]>http://support.dundas.com/Dashboard5.XAML_Error_xClassCanOnlyBeUsedOnLoadComponent.ashxWed, 17 Jun 2020 20:07:32 GMTScrewTurn Wiki RSS Feed Generator<![CDATA[XAML Error: xClassCanOnlyBeUsedOnLoadComponent]]>http://support.dundas.com/Dashboard5.XAML_Error_xClassCanOnlyBeUsedOnLoadComponent.ashx

Error

xClassCanOnlyBeUsedOnLoadComponent

xClassCanOnlyBeUsedOnLoadComponent


[0] Parser internal error: Object writer 'xClassCanOnlyBeUsedOnLoadComponent'. [Line: 1 Position: 292]
[System.Windows.Markup.XamlParseException] at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean
createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)
at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace,
Boolean allowEventHandlers)
at Dundas.Controls.DataVisualization.Map.Importers.XamlDiagramImporter..ctor(Stream shapeFileStream)
at Dundas.Dashboard.Wizards.MapDataImportWizardViewModel.FireWizardFinished()
at Dundas.Dashboard.Wizards.MapDataImportWizardView.MapDataImportWizard_Finished(Object sender, EventArgs e)
at Dundas.Dashboard.Controls.Wizard.FinishedButton_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32
actualArgsTypeIndex, String eventName, UInt32 flags)




Symptoms

This error is seen when importing a XAML file into the map resources.

Cause

The error might arise when x:Class used in the file is not correct or the code behind (xaml.cs) has the wrong namespace.

Resolution

Check whether the namespace specified in X:Class is correct and the code behind (xaml.cs) also uses the same namespace. If you are using a XAML file only without a code behind file (xaml.cs), then you do not need the x:Class tag in your XAML file. Remove this and the exception should go away.

Download a sample XAML file from here: Maps XAML file sample

Related Topics


]]>
nikhilb@dundas.com (nikhilb@dundas.com)Mon, 12 May 2014 20:19:25 GMTC61DC206271F0EA82BF9F6E74285B64F