Focus on Toolbox and Active DocumentWindow changes from Floating window

Docking/MDI for WPF Forum

Posted 10 years ago by Liz Lissack
Version: 13.2.0592

Our application has a Toolbox window (an Actipro ToolWindow) which has different content depending on the Document being viewed. 

I have all these Document windows open as Tabs and I float a Document window.  I then try and click on its associated Toolbox and the DockSite changes the ActiveWindow from my floated view to the latest Docked Document instead. This means my Toolbox content is changing unnecesarily. 

We also have other Toolbox windows that implement the IActiveAware interface that are related back to the current Focus/Active document and these are also losing their correct content when I click in them based on having a Floated view.

Why is the Docked Document window gaining Activation and Focus when I am only cliking in the Toolbox area after floating a document?

Can this behvaiour be suppressed or is this currently being changed in Actipro? 

And if this is not going to be change in the next version can you suggest a workaround please?

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Liz,

I don't believe that clicking in the content area of a Toolbox should directly cause any code of ours to activate another docking window.  You might be able to track down where it's happening if you watch the WindowActivated event and look at the call stack of this particular scenario.  Offhand I believe the only time it will restore focus to a document is when a docking window that had focus is closed.

If you'd like us to look into it further, can you please make a new minimal sample project that shows it and email that to our support address?  Please rename the .zip file extension so it doesn't get spam blocked and reference this thread.  We can use it to debug and see what's happening.  Ideally you could make it without Prism usage, since that adds another layer of complexity when debugging.

Actipro Software Support

Posted 10 years ago by Liz Lissack

Yes I couldn't believe it either but watching WindowActivated and LastActiveDocumentChanged shows this to be true in our app.  I think it is likely to do with nested DockSites.  Whilst the ToolWindows are attached to the main parent DockSite our Document windows are in one of 2 DockSites depending on thier type.

It may take a little while to put a mini-sample together so please bear with me.  I'll email ASAP.

Posted 10 years ago by Liz Lissack

I have sent a sample to the support address which shows this behaviour.  Please can you check it out ASAP as this is mega important to our core functionality. Currently we are using a workaround which is causing other side-effects throughout our Document windows etc.

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.