I'm quite sure that this is a conflict bug between Dock Manager and Toolbars Manager. It happens even when I've already updated to the latest version (2033). This is how to replicate the problem:
In a new form, add a Toolbars Manager. Add some toolbars and some tools.
Add a Dock Manager. Add two Panes: one docked to the left and one docked to the right (can use any controls inside the panes).
Start Debugging the program. Exit the program to return to VS. The Toolbars Component will disappear. I have to close the form and reopen to make it appear again. However, if I save the form after it disappears, the component will be deleted permanently from the form.
If I delete the Dock Manager then the bug is gone. I think the problem comes from the ToolbarsDockArea and UnpinnedTabArea, but it's just my guess.
One more question: when I group two or more DockableWindows in a Pane, when I unpin it, why can I see only one name.
I have the screenshots but don't know how to upload them here.
I have this exact same problem....
The error occurs on an MDI form with a Dock Manager, Toolbar Manager and TabbedMDI Manager...
It occurs every time any change is made to the designer of the MDI form, whether it be a change to the form itself, or any of its components and controls...
Upon running the program, the form in the designer loses its toolbar and entire top dock area turns black...the program runs and the toolbar is in the running program.
Closing the program and returning to design the toolbar does not come back, and I am left with a black rectangle where the top dock area is. If I close the designer view and reopen it the toolbar comes back...
In all cases the actual component disappears as well...despite the fact that all references to it in code remain.
Once again the only solution is to close the form design window and then reopen it...
Total pain and fear everytime you run the app worrying about this...
SWhit
I have been able to repair the problem. What seems to occur is the UltraToolbarsManager.DockWithinContainer property loses its value. Reset the value to dock within your form and the Toolbar reappears.
KSimmons
I can only reproduce this issue by placing a PropertyGrid on the Form and running it. Do your Forms have a PropertyGrid on it at design time? If so, this is a bug with the PropertyGrid control which affects the UltraToolbarsManager. To get around the issue, set the SelectedObject of the PropertyGrid at design time.
If the Form does not have a PropertyGrid, please provide more information about how to reproduce the issue or a sample which demonstrates the issue. Thank you for any help you can provide.
Unfortunately, the issue still seems random to me. An earlier suggestion of making sure that the form designer is closed before executing a debug session seems to be doing the trick. Although, the problem does not appear every time that the form designer is left open. If more information surfaces I will be certain to share my findings.
If I had to guess, I'd say an exception is being thrown and caught internally. But without being able to reproduce this, it is almost impossible to try to fix it. I look forward to any additional information you can find about this issue. If you attach one instance of VS to the instance that has your project open and you turn on first-chance exceptions, you may be able to see a stack trace of the exception which causes the problem before it is caught. If so, post the stack trace here or submit it to Developer Support. Thank you in advance for any help you can provide.
I'm having the same sort of problems. I'm definitely getting "a feel" that running an app in debug or run mode with the designer open causes problems. I've lost settings, had toolbars disapear and all sorts. I did as you said and attached a debugger to the running VS.NET instance.
This is a slightly different problem. I created a toolbar. At some point it dissapeared from runtime. It still shows in the designer.
I went to move it in the designer and Visual Studio crashed. Luckily the debugger was still attached and it reported this exception:
System.NotSupportedException{"Can't modify or delete an object that was created on a base form."}{System.Collections.ListDictionaryInternal}
"Infragistics2.Win.UltraWinToolbars.v10.1"" at Infragistics.Win.UltraWinToolbars.UltraToolbarBase.VerifyCanBeModified()\r\n at Infragistics.Win.UltraWinToolbars.UltraToolbar.set_DockedPosition(DockedPosition value)\r\n at Infragistics.Win.UltraWinToolbars.ToolbarUIElement.ProcessDoubleClick()\r\n at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnMouseHookMessageReceived(Object sender, MouseHookEventArgs e)\r\n at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.RaiseMouseHookEvent(MouseHookEventArgs e)\r\n at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.MouseHookManager.HookProc(Int32 ncode, IntPtr wparam, IntPtr lparam)"{Void VerifyCanBeModified()}
Indeed the ToolbarManager is on a base form. But I succesfully moved the toolbar beforehand, and was just in the process of moving it back.
Toolbars and tools defined on a base form cannot be modified by the designer for inherited forms. The reason for this is that toolbars and tool have local variables declared form them in the InitializeComponent method of the base form so properties can be set and they can be added to the UltraToolbarsManager. There are no member variables in the base form keeping references to these objects. So when the InitializeComponent method returns, the only thing keeping references to those objects is the UltraToolbarsManager. Then when the InitializeComponent method of the inherited form is called, it has no way to get a reference to the toolbars and tools from the base form, so it can't set properties on them. Normally, VS would just let you set properties on these items and your settings would just be lost when you actually went to run. But we throw an exception intentionally to let you know that this is something that is not possible.