In this scenario, the RadMap control is placed inside a RadDocking pane. The exception is raised when you click and hold the mouse on a drawn polygon. Then the mouse is released outside of the Form. When closing the tab holding the map, an exception is thrown.
Hello, Chris,
Thank you for providing further clarifications on this issue. We will have it in mind while fixing the bug!
Regards,
Nadya | Tech Support Engineer
Progress Telerik
So to summarise, this exception is raised when a RadMap is added to a RadPageView control (which is then docked in a standard windows form). That form is then opened as an MDI child within a RadDock (where AutoDetectMdiChildren = true).
On the map, Pins and Polygons are then added (where the pins are the points of the polygon).
If the viewpoint of the map is then changed (shift around and zoom in/out) and the form is then closed via the close button of the tabbed form within the dock, an exception is raised:
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor), at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments), at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture), at Telerik.WinControls.UI.Docking.HostWindow.ActivateAsMdiChild(), at Telerik.WinControls.UI.Docking.RadDock.UpdateActiveWindow(DockWindow window, Boolean forceNotify), at Telerik.WinControls.UI.Docking.RadDock.ActivateWindow(DockWindow window, Boolean forceNotify), at Telerik.WinControls.UI.Docking.RadDock.EnsureActiveWindow(Boolean activateForm), at Telerik.WinControls.UI.Docking.RadDock.EndTransactionBlock(), at Telerik.WinControls.UI.Docking.RadDock.RegisterTransaction(RadDockTransaction transaction, Boolean saveActiveWindow), at Telerik.WinControls.UI.Docking.RadDock.CloseWindow(DockWindow window), at Telerik.WinControls.UI.Docking.DockWindow.Close(), at Telerik.WinControls.UI.Docking.DockTabStrip.OnTabCloseButtonClicked(TabStripItem item), at Telerik.WinControls.UI.TabStripItem.OnCloseButtonClick(Object sender, EventArgs e), at Telerik.WinControls.RadElement.OnClick(EventArgs e), at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e), at Telerik.WinControls.UI.RadButtonElement.OnClick(EventArgs e), at Telerik.WinControls.RadElement.DoClick(EventArgs e), at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args), at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args), at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args), at Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e), at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e), at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e), at Telerik.WinControls.UI.Docking.DocumentTabStrip.OnMouseUp(MouseEventArgs e), at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks), at System.Windows.Forms.Control.WndProc(Message& m), at System.Windows.Forms.ScrollableControl.WndProc(Message& m), at Telerik.WinControls.RadControl.WndProc(Message& m), at Telerik.WinControls.UI.SplitPanel.WndProc(Message& m), at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m), at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m), at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Cannot access a disposed object., Object name: 'RadMap'., Stack Trace: at System.Windows.Forms.Control.CreateHandle(), at System.Windows.Forms.Control.get_Handle(), at System.Windows.Forms.Control.GetSafeHandle(IWin32Window window), at System.Windows.Forms.ToolTip.Hide(IWin32Window win), at System.Windows.Forms.ToolTip.HideAllToolTips(), at System.Windows.Forms.ToolTip.BaseFormDeactivate(Object sender, EventArgs e), at System.EventHandler.Invoke(Object sender, EventArgs e), at System.Windows.Forms.Form.OnDeactivate(EventArgs e), at System.Windows.Forms.Form.set_Active(Boolean value), at System.Windows.Forms.Form.ActivateMdiChildInternal(Form form), at System.Windows.Forms.Form.ActivateMdiChild(Form form)
Hi Chris,
Thank you for reporting this.
Regards,
Dinko | Tech Support Engineer
Progress Telerik