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
When switched our project from .Net framework 4.6.1 to 4.7.2, the ApplyStyleToLayoutItem routine in Xceed.Wpf.AvalonDock.DockingManager causes a ModelChange event. Handling the event requires that the new LayoutDocumentItem is in the DockingManager's _layoutItems list. Unfortunately, the new LayoutDocumentItem is only added after ApplyStyleToLayoutItem completes.
The handler for ModelChange event in LayoutDocumentTabItem fails to set LayoutItem property and its CloseCommand no longer executes. Also, the item appears blank. Deselecting and reselecting allows its content to show, but does not fix the CloseCommand.
To be clear, we switched the .Net framework only in our projects and not in the Avalon dock project.
The fix appears to be to re-order the two lines (in two places) in Xceed.Wpf.AvalonDock.DockingManager.cs as shown below.
As you might expect the real project is quite complex and I cannot share it. But I don't understand the Avalon Dock well enough to cause ApplyStyleToLayoutItem to run. So the radically trimmed down version that I mocked up doesn't cause the behavior.
Dirkster99
added a commit
to Dirkster99/AvalonDock
that referenced
this issue
Feb 14, 2019
When switched our project from .Net framework 4.6.1 to 4.7.2, the
ApplyStyleToLayoutItem
routine inXceed.Wpf.AvalonDock.DockingManager
causes aModelChange
event. Handling the event requires that the newLayoutDocumentItem
is in theDockingManager
's_layoutItems
list. Unfortunately, the newLayoutDocumentItem
is only added afterApplyStyleToLayoutItem
completes.The handler for
ModelChange
event inLayoutDocumentTabItem
fails to setLayoutItem
property and itsCloseCommand
no longer executes. Also, the item appears blank. Deselecting and reselecting allows its content to show, but does not fix theCloseCommand
.To be clear, we switched the .Net framework only in our projects and not in the Avalon dock project.
The fix appears to be to re-order the two lines (in two places) in Xceed.Wpf.AvalonDock.DockingManager.cs as shown below.
The text was updated successfully, but these errors were encountered: