Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Error loading XAML file in designer

$
0
0

When I open up my XAML file from a WPF 4.0 application in the VS 2010 designer, I get this error message:

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.DocumentNodeObjectReader.get_Value()
   bei System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   bei System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, Boolean skipJournaledProperties, Uri baseUri)
   bei System.Windows.Markup.XamlReader.Load(XamlReader xamlReader, ParserContext parserContext)
   bei System.Windows.Markup.XamlReader.Load(XamlReader reader)
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkTemplateInstanceBuilder.InstantiateTemplate(IDocumentRoot xamlDocument, TemplateSerializerContext context)
   bei Microsoft.Expression.DesignModel.InstanceBuilders.FrameworkTemplateInstanceBuilderBase`7.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   bei Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

I've tried to analyse it by the instructions in the help, but debugging the VS process didn't work and I cannot determine the designer mode in my markup extension class. Also this exception message is not helpful. Where can I go on searching now?

I've tried to create a small test case application containing only the offending code, but everything works fine there. I could not create a working testcase yet to demonstrate the error.

Oh, and everything works perfectly at runtime, it's just the designer that is broken.

Viewing all articles
Browse latest Browse all 18858

Trending Articles