This is a migrated thread and some comments may be shown as answers.

Problem using RadMenu

6 Answers 93 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 21 Jan 2011, 04:40 PM
I have just updated to the latest version of the trial controls and now get the error below after dragging a RadMenu control onto a user control.

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

Sort by
0
Alan
Top achievements
Rank 1
answered on 21 Jan 2011, 06:59 PM
This problem went away by itself. I did nothing to make it disappear.
0
Alan
Top achievements
Rank 1
answered on 21 Jan 2011, 07:49 PM
I only thought it went away. The RadMenu seemed to work but I couldn't get expression blend to load the user control where the menu is used,  I then tried a test to drag a menu into a new user control and it again and had the same problem.  It produced a more detailed error message in VS 2010:

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.

0
Hristo
Telerik team
answered on 24 Jan 2011, 10:05 AM
Hi Alan,

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
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Alan
Top achievements
Rank 1
answered on 25 Jan 2011, 02:40 AM

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:


Is it preferred to use that reference rather than:
 
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
 

 

 

 

 

0
Accepted
Hristo
Telerik team
answered on 25 Jan 2011, 09:01 AM
Hi Alan,

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
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Alan
Top achievements
Rank 1
answered on 25 Jan 2011, 02:04 PM
Thanks.  That is what I was thinking, that it would be simpler and cleaner.
Tags
Menu
Asked by
Alan
Top achievements
Rank 1
Answers by
Alan
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or