Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)
When I dragged the RadMenu to the design surface, the following reference was added:
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
This is what I would have expected. Please help.
6 Answers, 1 is accepted
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
at MS.Internal.XcpImports.Collection_Add[T](PresentationFrameworkCollection`1 collection, Object value)
at System.Windows.PresentationFrameworkCollection`1.AddImpl(Object value)
at System.Windows.PresentationFrameworkCollection`1.System.Collections.IList.Add(Object value)
at Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateChildren(IInstanceBuilderContext context, ViewNode viewNode, DocumentCompositeNode compositeNode, Boolean isNewInstance)
I want to style the menu in expression blend so I need for it to be able to load there as well as not cause an error in VS 2010.
I'm unable to reproduce this issue. I've created new Blend 4 (version 4.0.20901.0) project, added reference to Telerik.Windows.Controls and Telerik.Windows.Controls.Navigation assemblies and then dragged a RadMenu into design surface. It was added with few children (RadMenuItems) and renders correctly. The same project design time works in Visual Studio 2010 Ultimate too.
Please let us know the exact steps to reproduce this error. Also please check that you are using the same version of assemblies (both should be 2010.3.1314.1040) and if possible try to create a new project and let us know if the problem exist (Blend is caching the assemblies so when you upgrade to newer version blend is mixing the old with the new assemblies and produce such strange errors).
Best wishes,
Hristo
the Telerik team
Thanks for the reply. After much searching on the web, I concluded that I had some corrupted project files. Using devenv /rebuild, I was able to repair my application after which, the problem with RadMenu went away.
I do have another question though. In Blend or VS 2010, when I dragged a RadMenu onto the Artboard, the following reference was created:
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Is it preferred to use that reference rather than:
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
The first one "telerik" is a URI namespace which allows you to have multiple CLR namespaces mapped to it. For example if you add Controls and Input assemblies using the URI namespace you will be able to see all controls from both assemblies.
The other "telerikNavigation" is not a URI namespace, its pointing directly to a CLR namespace so you will be able to see only controls from this namespace in the specified assembly.
I would recommend using the URI namespace because it is more convenient and you will need much less defined namespaces in XAML which will lead to cleaner xaml.
All the best,
Hristo
the Telerik team