Hi,
How to remove exception like Element already has a logical parent. It must be detached from the old parent before it is attached to a new one.
For Example
ToolWindowContainer con = newToolWindowContainer();
con.Items.Add(toolWindow);
BaseDocksite.AutoHideLeftContainers.Add(con);
toolwindow that i want to add in the con(ToolwindowContainer) is attached with the Logical parent that is its container.
If i reterieve the container using
ToolWindowContainer ablContainer = toolWindow.Parent asToolWindowContainer;
and then close this container using
ablContainer.Close();
con.Items.Add(toolWindow);
BaseDocksite.AutoHideLeftContainers.Add(con);
its working fine.
But I don't want to close this container attached with the toolwindow.
So how to solve this problem without closing this container attached with the toolwindow.
[Modified 12 years ago]