-
Notifications
You must be signed in to change notification settings - Fork 336
Description
Hi,
i noticed another strange behavior, which can be easily reproduced in your MVVMTestApp.
In case you have atleast two documents (doc1, doc2) and some panel that displays content based on ActiveContent property of avalondock (FileStatsPanel).
Place doc1 as normal document
Place FileStatsPanel as side panel
Place doc2 as floating window
Then when you select doc1, FileStatsPanel displays data based on doc1 - ok
When you select doc2, FileStatsPanel displays data based on doc2 - ok
Steps
- select doc1
- select doc2
- select File Stats panel
If you make steps 1,2,3 then fileStatsPanel will display content based on doc1 instead of doc2. So editing FileStats data for doc2 isnt possible in this case
if ou make steps 1,2,3,2,3 then fileStatsPanel will display content correctly.
When FileStatsPanel is as floating panel, everything works fine.
In my opinion, issue is based on changing ActiveContent to document when clicking from floating window into non-floating panel, then ActiveContent is changed to document that is in same window as non-floating panel. (can be observed by breakpoint in workspace.cs -> ActiveDocument setter (line 109?)
MVVMTestApp.dll!AvalonDock.MVVMTestApp.Workspace.ActiveDocument.set(AvalonDock.MVVMTestApp.FileViewModel value) Line 109 C#
[External Code]
AvalonDock.dll!AvalonDock.DockingManager.ActiveContent.set(object value) Line 1027 C#
AvalonDock.dll!AvalonDock.DockingManager.OnLayoutRootPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) Line 1794 C#
AvalonDock.dll!AvalonDock.Layout.LayoutElement.RaisePropertyChanged(string propertyName) Line 128 C#
AvalonDock.dll!AvalonDock.Layout.LayoutRoot.InternalSetActiveContent(AvalonDock.Layout.LayoutContent currentValue, AvalonDock.Layout.LayoutContent newActiveContent) Line 750 C#
AvalonDock.dll!AvalonDock.Layout.LayoutRoot.ActiveContent.set(AvalonDock.Layout.LayoutContent value) Line 235 C#
AvalonDock.dll!AvalonDock.Layout.LayoutContent.IsActive.set(bool value) Line 183 C#
AvalonDock.dll!AvalonDock.Controls.LayoutDocumentControl.SetIsActive() Line 135 C#
AvalonDock.dll!AvalonDock.Controls.LayoutDocumentControl.OnPreviewGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e) Line 111 C#