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

ManagedRuntimeError when opening submenu

1 Answer 59 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Patrik
Top achievements
Rank 1
Patrik asked on 02 Feb 2011, 09:07 AM
Hello Telerik!

In my application I dynamically add and remove RadMenuItems to a parent RadMenuItem, but occasionally I get the following Exception when submenu is about to display:

Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.InvalidOperationException: Animation target not specified.
    at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
    at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
    at System.Windows.Media.Animation.Storyboard.Begin()
    at Telerik.Windows.Controls.Animation.AnimationManager.Play(FrameworkElement target, String animationName, Action completeCallback, Object[] args)
    at Telerik.Windows.Controls.RadMenuItem.RunExpandAnimation(RadMenuItem menuItem)
    at Telerik.Windows.Controls.RadMenuItem.<>c__DisplayClass5.<OnIsSubmenuOpenChanged>b__0(Object sender, EventArgs args)
    at Telerik.Windows.Controls.PopupWrapper.OnPopupOpened(Object sender, EventArgs e)
    at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
    at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String

I seems to appear when I remove an item, sets IsEnabled to false on the parent, adds a new child and sets IsEnabled to true again on the parent menu. The Exception makes my application to crash and I seem unable to catch it (that is I can catch it in the App-class, but not before that).

I'm using 2010_3_1129_DEV_hotfix binaries.

1 Answer, 1 is accepted

Sort by
0
Patrik
Top achievements
Rank 1
answered on 02 Feb 2011, 09:31 AM
The problem went away when I upgraded to the latest binaries.
Tags
Menu
Asked by
Patrik
Top achievements
Rank 1
Answers by
Patrik
Top achievements
Rank 1
Share this question
or