This is a migrated thread and some comments may be shown as answers.
Multiple menus causes error
1 Answer 41 Views
This is a migrated thread and some comments may be shown as answers.
Hannes Bantjes
Top achievements
Rank 1
Hannes Bantjes asked on 12 Nov 2008, 08:28 PM



I have  the following setup:


Control 1

-----Control 1.1
-----Control 1.2

I start with the first control visible and then hides/shows control 1.1 or 1.2 based on a button click.  My problem is that I can hide/show any one of the sub-controls as many times as I want to and the menu on the sub control works 100%, but as soon as I show the second control hovering over the menu causes the following error:

Microsoft JScript runtime error: Unhandled Error in Silverlight 2 Application: Value does not fall within the expected range.
   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
   at System.Windows.UIElement.UpdateLayout()
   at Telerik.Windows.Controls.PopupWrapper.AdjustPopupLocation()
   at Telerik.Windows.Controls.PopupWrapper.OnPopupOpened(Object sender, EventArgs e)
   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Does anyone know what might be causing this error?  This only started happening after I upgared to the latest silverlight release.  Beta 2 worked fine.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 13 Nov 2008, 12:54 PM
Hi Hannes,

Hello Hannes,

You are receiving an error because you have controls with same value on x:Name attribute. You are not allowed to have elements with same names (x:Name) in the same namescope. Remove the x:Name attribute or set different names and you application will work.

If you have other questions, I'll be glad to help.

the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Hannes Bantjes
Top achievements
Rank 1
Answers by
Telerik team
Share this question