Can't split two DockableContents in the DocumentPane


For example. I have 2 DockableContent docked in the DocumentPane one by one. If I try to dock one of them with DocumentPane splitting, the exception will happen.
System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first.
at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.AddLogicalChild(Object child)
at System.Windows.Controls.UIElementCollection.SetLogicalParent(UIElement element)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element)
at System.Windows.Controls.UIElementCollection.Add(UIElement element)
at AvalonDock.DockingManager.Anchor(DockablePane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor) in d:\projects\trade-lab\avalondock\dockingmanager.cs:line 819
at AvalonDock.DockingManager.Anchor(Pane paneToAnchor, Pane relativePane, AnchorStyle anchor) in d:\projects\trade-lab\avalondock\dockingmanager.cs:line 791
at AvalonDock.OverlayWindow.OnDrop(OverlayWindowDockingButton owdDock, Point point) in D:\Projects\Trade-lab\AvalonDock\OverlayWindow.cs:line 133
at AvalonDock.OverlayWindowDockingButton.OnDrop(Point point) in D:\Projects\Trade-lab\AvalonDock\OverlayWindowAnchorButton.cs:line 112
at AvalonDock.DragPaneServices.EndDrag(Point point) in D:\Projects\Trade-lab\AvalonDock\DrapPaneServices.cs:line 145
at AvalonDock.DockingManager.OnMouseUp(MouseButtonEventArgs e) in d:\projects\trade-lab\avalondock\dockingmanager.cs:line 1907
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Probably, it happens because library is designed to use DocumentContent in the DocumentPane, but I doesn't need the DocumentContent in the application, only DockableContent is needed.
Closed May 22, 2013 at 4:24 PM by emartin
Old or obsolete issue. Please ask for reopen if needed in version 2.0


adospace wrote Jun 6, 2008 at 11:42 AM

Can you provide xaml code?

nektodron wrote Jun 6, 2008 at 2:56 PM

I haven't XAML, panes is created in the code and shows via DockManager.Show()

nektodron wrote Jun 6, 2008 at 2:59 PM

panes = DocumentContents

nektodron wrote Jun 6, 2008 at 4:22 PM

I've investigated this problem and think that it causes because library is designed to have BOTH DockableContent and DocumentContent in the application, but I need to have ManagedContent which can be docked like DockableContent and DocumentContent simultaneous. Is it possible?

wrote Aug 29, 2008 at 6:04 PM

wrote Jan 18, 2013 at 1:30 PM

wrote Feb 19, 2013 at 1:40 AM

wrote Feb 22, 2013 at 2:23 AM

wrote May 22, 2013 at 4:17 PM

wrote May 22, 2013 at 4:24 PM