Dirkster99 / AvalonDock

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IsSelected vs IsActive behavior changed from 3.x to 4.1/4.2?

derammo opened this issue · comments

I have a collection of tabbed documents. When I dynamically add a LayoutDocument child to the LayoutDocumentPane, I would like the new document to be the active/selected tab.

In 3.x, setting IsSelected to true resulted in the new LayoutDocument being selected and receiving focus.

In 4.x (I tried 4.10 and 4.20) the same behavior requires setting IsActive to true also? Is this as designed?

This sounds like a bug to me. Can you give me a sample application please (you can attach a zip file to the issue) and let me know with which version this used to work and where it stopped working?

Thanx for raising the issue Drk

It is unlikely that I will find time soon to do this, as I am working on getting a release out myself. :)

I had similar issues in our application. I added

protected override void OnSelectionChanged(SelectionChangedEventArgs e)
{
    base.OnSelectionChanged(e);

    if (_model.SelectedContent != null)
        _model.SelectedContent.IsActive = true;
}

to the LayoutDocumentPaneControl.cs file and it seems to behave like before.

Closed without intention -> Re-open