We have a UI that contains multiple docksites, with each containing toolwindow objects. If I have 3 docksites with each having a toolwindow, then I drag the middle docksite to the bottom, then move the bottom docksite's toolwindow to the middle docksite the following error is displayed...
*** EXCEPTION ***
System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first.
at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.AddLogicalChild(Object child)
at ActiproSoftware.Windows.Controls.Docking.Primitives.DockingWindowContainerBase.OnWindowsChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection'1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection'1.InsertItem(Int32 index, T item)
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#6Hj(DockingWindow #sb, IDockTarget #7Hj, Int32 #8Hj)
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#nIj(DockingWindow #sb, IDockTarget #7Hj, Nullable'1 #Zb, Nullable'1 #Fwf, Int32 #8Hj, Boolean #yGj)
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.Dock(IEnumerable'1 #JSd, DockingWindowState #GIj, IDockTarget #7Hj)
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.Dock(DockHost #rl, IDockTarget #7Hj, Nullable'1 #Fwf)
at ActiproSoftware.Windows.Controls.Docking.Logic.WindowDragProcessorBase.#uUc(Boolean #DHj)
at ActiproSoftware.Windows.Controls.Docking.DockSite.StopWindowDrag(IFloatingWindow floatingWindow, Boolean allowTargetDrop)
at ActiproSoftware.Windows.Controls.Docking.Logic.NonHostedFloatingWindow.#SIj(Object #xhb, WindowBoundsChangeEventArgs #yhb)
at ActiproSoftware.Windows.Themes.WindowChrome.RaiseWindowBoundsChangedEvent(Window window, Boolean isMove)
at ActiproSoftware.Windows.Themes.WindowChromeManager.WindowProc(IntPtr #Qqb, Int32 #7Ff, IntPtr #8Ff, IntPtr #Uqb, Boolean& #lXd)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)