Welcome to the Xceed Community | Help
Community Search  
More Search Options

DockingWindows exception occured when Close the window.

Sort Posts: Previous Next
  •  11-08-2010, 5:01 PM Post no. 29166

    DockingWindows exception occured when Close the window.

    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

  •  11-09-2010, 10:08 AM Post no. 29173 in reply to 29166

    Re: DockingWindows exception occured when Close the window.

    Hi Denis,

    Can you send us a sample application that reproduces this behavior to support@xceed.com so that we can investigate further?


    Regards,

    Alain Jreij,

    Web Developer,

    Xceed Software Inc
  •  11-09-2010, 12:09 PM Post no. 29176 in reply to 29173

    Re: DockingWindows exception occured when Close the window.

    Done.

    Thank you

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.