Can I set a default Open/Closed state on a ToolWindow?

Docking/MDI for WPF Forum

Posted 13 years ago by Craig - Varigence, Inc.
Version: 10.2.0532
Avatar
Is there a way to set a default open or closed state for an individual ToolWindow? Perferably (and perhaps obviously) the state would be overriden by activating the window in code, if the user activates the tool window manually, or if the serialization system reports the ToolWindow's state.

Thanks,

-Craig

Comments (3)

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

Please see our Docking & MDI Features Demo and look for the "initiallyClosedToolWindow" ToolWindow. That ToolWindow is initially closed and can be activated/docked at any time. Otherwise, you'd need to close the ToolWindows after the DockSite is loaded.


Actipro Software Support

Posted 13 years ago by Craig - Varigence, Inc.
Avatar
I don't understand why the ToolWindow is initially closed though. Is it just because it's in its own XAML ToolWindows collection? What if I wanted it to be initially closed in a ToolWindow container?

(And for future reference, the demo being referred to in the previous post is in the Samples browser for Docking & MDI - it's the Features (in-line) demo. When you go to the Activate menu, you'll be able to activate the initially closed window).
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

The DockSite.ToolWindows collection contains all registered ToolWindows, which can be displayed in the DockSite. You can add ToolWindows directly to this collection or you can define them in the DockSite's content in XAML (i.e. using SplitContainers and ToolWindowContainers), in which case the ToolWindows will register themselves.

If a ToolWindow is added to the ToolWindows collection directly, then it is not automatically opened. You must manually open or activate it. When the ToolWindow is defined in the DockSite's content, they are opened in the specified position.

A ToolWindow cannot be closed and in a ToolWindowContainer. Once a ToolWindow is closed it is removed from any parent container (such as ToolWindowContainer or TabbedMdiContainer).


Actipro Software Support

The latest build of this product (v24.1.1) 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.