You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I use Drag&Drop to move a document and dock it in a new panel a NullReferenceException is thrown in OnModelChanged.
It seems that the line SetLayoutItem(Model.Root.Manager.GetLayoutItemFromModel(Model)); is the problem. The debugger shows that Model.Root is null. The CallStack is quite long:
AvalonDock.dll!AvalonDock.Controls.LayoutDocumentControl.OnModelChanged(System.Windows.DependencyPropertyChangedEventArgs e) Line 52 C#
AvalonDock.dll!AvalonDock.Controls.LayoutDocumentControl.OnModelChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) Line 43 C#
[...]
AvalonDock.dll!AvalonDock.DockingManager.InternalRemoveLogicalChild(object element) Line 1441 C#
AvalonDock.dll!AvalonDock.Controls.LayoutFloatingWindowControl.FloatingWindowContentHost.DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd) Line 137 C#
[...]
AvalonDock.dll!AvalonDock.Controls.LayoutFloatingWindowControl.OnClosed(System.EventArgs e) Line 536 C#
AvalonDock.dll!AvalonDock.Controls.LayoutDocumentFloatingWindowControl.OnClosed(System.EventArgs e) Line 150 C#
[...]
As you can see the method LayoutDocumentFloatingWindowControl.OnClosed is called before the OnModelChanged.
There the Root is disposed before the window is closed:
Hi, when I use Drag&Drop to move a document and dock it in a new panel a NullReferenceException is thrown in OnModelChanged.
It seems that the line
SetLayoutItem(Model.Root.Manager.GetLayoutItemFromModel(Model));
is the problem. The debugger shows that Model.Root is null. The CallStack is quite long:As you can see the method
LayoutDocumentFloatingWindowControl.OnClosed
is called before theOnModelChanged
.There the Root is disposed before the window is closed:
Not sure why this is only a problem in my project. But looks logical to me, that a NullReferenceException is thrown.
The text was updated successfully, but these errors were encountered: