Open xceedsoftware opened 7 years ago
BoucherS[CodePlex]
Hi,
In v3.5, dropping LayoutAnchorable/LayoutDocument into nested DockingWindows will no longer be allowed.
―――― Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
Dige[CodePlex]
If the application contains nested DockinManagers then dragging an anchorable from the outer DockingManager on top of an anchorable in the inner DockingManager is allowed. Even worse, dropping the anchorable from the outer DockingManager causes an unhandled exception and destroys the dragged anchorable completely. The issue can easily be reproduced with the attached project, just drag the anchorable from the right side inside the anchorable inside the document. Message: Specified element is already the logical child of another element. Disconnect it first. Stacktrace: at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent) at System.Windows.FrameworkElement.AddLogicalChild(Object child) at Xceed.Wpf.AvalonDock.DockingManager.InternalAddLogicalChild(Object element) at Xceed.Wpf.AvalonDock.DockingManager.CreateAnchorableLayoutItem(LayoutAnchorable contentToAttach) at Xceed.Wpf.AvalonDock.DockingManager.Layout_ElementAdded(Object sender, LayoutElementEventArgs e) at Xceed.Wpf.AvalonDock.Layout.LayoutRoot.OnLayoutElementAdded(LayoutElement element) at Xceed.Wpf.AvalonDock.Layout.LayoutElement.OnRootChanged(ILayoutRoot oldRoot, ILayoutRoot newRoot) at Xceed.Wpf.AvalonDock.Layout.LayoutElement.set_Parent(ILayoutContainer value) at Xceed.Wpf.AvalonDock.Layout.LayoutGroup
1._children_CollectionChanged(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.ObservableCollection1.InsertItem(Int32 index, T item) at System.Collections.ObjectModel.Collection
1.Insert(Int32 index, T item) at Xceed.Wpf.AvalonDock.Controls.AnchorablePaneDropTarget.Drop(LayoutAnchorableFloatingWindow floatingWindow) at Xceed.Wpf.AvalonDock.Controls.DropTarget`1.Drop(LayoutFloatingWindow floatingWindow) at Xceed.Wpf.AvalonDock.Controls.OverlayWindow.Xceed.Wpf.AvalonDock.Controls.IOverlayWindow.DragDrop(IDropTarget target) at Xceed.Wpf.AvalonDock.Controls.DragService.Drop(Point dropLocation, Booleanamp dropHandled) at Xceed.Wpf.AvalonDock.Controls.LayoutFloatingWindowControl.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Booleanamp handled) at Xceed.Wpf.AvalonDock.Controls.LayoutAnchorableFloatingWindowControl.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Booleanamp handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Booleanamp handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Booleanamp 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)