Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ActiveContent not stable

ice1e0 opened this issue · comments

When I bind to ActiveContent, it seems like something is not stable at some circumstances:

I have the following layout:
image

When I add an page to 'DocumentPages', I get three times an update of 'ActiveContent' that the added page is now my new page. (This is not an huge issue; it's just a bit confusing and I had this already using the Xceed AvalonDock in Version 3.5.7).

The issue comes in two other steps:

  1. When I click e.g. a bit besides the tab-header of the document page, the 'ActiveContent' is set to 'null' (which is not true, since the document page is still shown as active!) --> this issue is not present in the 3.5.7 version.
  2. When I close the page, I would expect the 'ActiveContent' be set to 'null', but this does not happen (this issue is present in 3.5.7 as well).

Maybe I misunderstand the 'ActiveContent' property. What I really need is a property giving me the current active document of the 'DocumentPages' (DocumentsSource); so, something like 'SelectedDocument' would just make it for me.

Btw; I am using Dirkster.AvalonDock in Version 4.20.0 in a .NET Core 3.1 app, recently upgraded from an old 3.5.7 version ...

Fixed in my pull request @Dirkster99

@ice1e0 can you please confirm whether this issue is solved with the current master branch?

I find that in the code gives any changed abount ActiveContect,I add more judgment to reslove that
@ice1e0 have a test if this work well

👍 works

Thanks for the feedback - the resolution will soon be available with the next release :-)