Exception when dragging one docksite's tool window to another docksite

Docking/MDI for WPF Forum

Posted 3 years ago by Mark Bonner
Version: 16.1.0633
Environment: Windows 7 (64-bit)
Avatar

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)

Comments (3)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mark,

Can you email us a new simple sample project that shows this happening so we can debug it and see if it's still an issue?  It sounds like something we may have already fixed, possibly for the next maintenance release.  Please send the project to our support address and mention this thread in your email.  Be sure to rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 3 years ago by Mark Bonner
Avatar

After further investigate it seems this problem is only occuring in version 16.1.633, not 16.1.632

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mark,

Thanks for the update.  Please still send us the sample project so we can debug with that and make sure any changes that we make properly fix the issue.  We appreciate it!


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.