Home › Forums › WinForms controls › Other WinForms controls › DockingWindows exception occured when Close the window.
-
AuthorPosts
-
#18588 |
I’ve investigated your ImagingCS example for docking windows.
I’ve added following source code to
ColorPalette.cs
protected override void OnClosed(EventArgs e)
{
Imaging._Imaging.CloseToolWindow(this);
base.OnClosed(e);
}and replace ColorPalette_VisibleChanged
private void ColorPalette_VisibleChanged(object sender, System.EventArgs e)
{
}and following code to Imaging.cs
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
_Imaging = new Imaging();
Application.Run(_Imaging);
}public static Imaging _Imaging;
public void CloseToolWindow(ToolWindow tw)
{
m_manager.ToolWindows.Remove(tw);
tw.Dispose();
}When Toolwindow X button pressed I’ve got the following crash application exception:
{“Collection was modified; enumeration operation may not execute.”}
Source: Xceed.DockingWindows.v2.2
at Xceed.Utils.Collections.ListBase.Enumerator.MoveNext()
at Xceed.DockingWindows.FloatingWindow.OnFloatingWindowClosed()
at Xceed.DockingWindows.FloatingWindow.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Form.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmNcButtonDown(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at Xceed.DockingWindows.FloatingWindow.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Xceed.DockingWindows.Samples.Imaging.Imaging.Main() in C:\Xceed Samples\Xceed Docking Windows for .NET v2.2\CSharp\Imaging\Imaging.cs:line 212
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()visualstudio 2010
What do I wrong?
Thank you
Imported from legacy forums. Posted by Denis (had 1255 views)
Hi Denis,
Can you send us a sample application that reproduces this behavior to support@xceed.com so that we can investigate further?
Imported from legacy forums. Posted by Alain [Xceed] (had 170 views)
Done.
Thank you
Imported from legacy forums. Posted by Denis (had 1897 views)
-
AuthorPosts
- You must be logged in to reply to this topic.