LoadToolWindowLayoutFromFile() show blank toolwindow

Docking/MDI for Windows Forms Forum

Posted 11 years ago by Dong JIA
Avatar
Hi all,

When LoadToolWindowLayoutFromFile(), if WindowLayoutFile contains some unknown toolwindow layout data(e.g.: an add-in create a toolwindow and its layout data has been saved into WindowLayoutFile. After that I remove the add-in), UI studio will show a blank toolwindow without anything.
How can I remove the blank toolwindow?
I have try to close the TabbedMdiWindow in DockManager.WindowInitializing, but it doesn't work.
From my opion, I hope there is a way to make me can filter out some GUID from layoutdata file.

Thanks in advance.
BR,
Dong

[Modified at 06/11/2008 02:34 AM]

[Modified at 06/11/2008 02:35 AM]

Comments (4)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi,

Just set DockManager.AutoCreateToolWindowsForLayoutLoad to false and it will ignore unknown tool windows when loadng layouts.


Actipro Software Support

Posted 11 years ago by Dong JIA
Avatar
Hi support,

Thanks for your quick response.

I like the idea to create tool window when LoadToolWindowLayoutFromFile(). I has implement code to create real controls when WindowInitializing. Here I wonder whether there is a way to filter some toolwindow out when initializing.

Thanks,
Dong
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry there isn't a way to filter them out as you load. However you can do the full load and then close some.

But also note that if you use the option I mentioned, and you have DockManager.UnknownToolWindowStatePreservationEnabled set to true, it will cache the location info for the unknown tool windows even though it doesn't create "blank" windows for them. Then if you load a tool window later with the same key and activate it, it will use that cached information. That may help accomplish what you want.


Actipro Software Support

Posted 11 years ago by Dong JIA
Avatar
Hi support,

Thanks. I will close these unknown toolwindow after LoadToolWindowLayoutFromFile().
BR,
Dong
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.