ToolWindow is briefly visible when IsOpen is false

I have a ToolWindow that I only want to show when the user requests it. When user presses the hotkey I call Activate() and that works great. In XAML I have IsOpen="False" so that the ToolWindow is not initially visible. But, it is visible briefly before disappearing, AKA the dreaded "flashing" effect.

[Edit: it also causes the DockSite.WindowsClosed to fire]

I suppose I can create code to manage the tool window lifecyle, but if it didn't flash, I would be done now :) Any chance this has been fixed or will be fixed?

Thanks

Jim

[Modified 5 months ago]

Comments (2)

Today I realized that I prefer to have this ToolWindow docked as a Document initially. (This ToolWindow contains a Help screen, so it makes more sense to just treat it as a document unless the user wants to to dock or float it).

I tried setting State to DockingWindowState.Document in the XAML, but that resulted in an Actipro exception about an illegal operation, as the object was not yet registered. Perhaps there is some restriction here? I couldn't find anything in the documentation.

So, I've changed my approach, and I switched to code. I just look for the ToolWindow and create it if not found, then call Activate(). The only wrinkle is that the ToolWindow may exist in the DockSite.Documents collection, or DockSite.ToolWindows collection, depending on its current state. This approach seems to work fine.

I'm testing a simple example setting IsOpen="False" in our latest 2018.1 code and don't see a flash. I would ask you try 2018.1 since you mentioned you are on a two year old version. It could be that some code was altered that helps with this in the meantime, or perhaps our test scenario doesn't reproduce exactly what you see.

If you still see it in the 2018.1 version and would like us to have a look, please make a new simple sample project that shows it and send that to our support address, referencing this thread. Remove the bin/obj folders from the ZIP you send and rename the .zip file extension so it doesn't get spam blocked. Then we can debug with that. Thanks!

If you'd like your tool window to start as a document, just put it in a Workspace/TabbedMdiHost/TabbedMdiContainer/ToolWindow hierarchy somewhere within the DockSite. That should work.

Actipro Software Support

The latest build of this product (2018.1 build 0674) was released 1 month ago,
which was after the last post in this thread.