Hi, my application creates a tab then adds a "close" menu item that is bound to a command. Inside the command I remove the tab, then I want to also remove the menu item. I'm getting this error:
<Exception>
<Message>Object reference not set to an instance of an object.</Message>
<StackTrace> at
Telerik.Windows.Controls.RadMenuItem.<>c__DisplayClass3.<OnIsSubmenuOpenChanged>b__1()
at
Telerik.Windows.Controls.Animation.AnimationManager.InvkokeCallbacks(Storyboard storyboard)
at
Telerik.Windows.Controls.Animation.AnimationManager.OnStoryboardCompleted(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)</StackTrace>
</Exception>
I'm guessing it's because I'm trying to remove the item inside the command it is bound to. How can I accomplish this?
Thanks!
Adam
<Exception>
<Message>Object reference not set to an instance of an object.</Message>
<StackTrace> at
Telerik.Windows.Controls.RadMenuItem.<>c__DisplayClass3.<OnIsSubmenuOpenChanged>b__1()
at
Telerik.Windows.Controls.Animation.AnimationManager.InvkokeCallbacks(Storyboard storyboard)
at
Telerik.Windows.Controls.Animation.AnimationManager.OnStoryboardCompleted(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)</StackTrace>
</Exception>
I'm guessing it's because I'm trying to remove the item inside the command it is bound to. How can I accomplish this?
Thanks!
Adam