Programatically changing a ToolWindow

Docking/MDI for WPF Forum

Posted 16 years ago by Matthias Mueller
Avatar
Hi!

* How can I pin or unpin (set to AutoHide) a ToolWindow by API?
* How can I make a ToolWindow floating by API?

BTW: what's the difference of DockingWindowState.AutoHide and DockingWindowState.Undocked?

-Matthias

Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can't do the first in API in the current beta yet, but that is part of the object model enhancements we're doing now. Basically we have added these methods:

AutoHide - Changes to unpinned mode. ("AutoHide" state)
AutoHideTo - Changes to unpinned state on a specified side. ("AutoHide" state)
Dock - Changed back to a docked state. ("Docked" state)
DockTo - Docks against a specified target. ("Docked" state)
Float - Floats to a default location. ("Floating" state)
FloatTo - Floats to a specified location. ("Floating" state)
Undock - Undocks to a default location. ("Undocked" state)
UndockTo - Undocks to a specified location. ("Undocked" state)

A question for you and everyone else...

We have "To" on the end of some methods in cases where you are specifying targets or target locations. Should be keep those or just make them overloads of the non-"To" named methods?

AutoHide state is unpinned on the DockSite side. Docked is pinned. Floating is the same as Undocked where they are hosted in a rafting container above the main Window, but the difference is that in Floating state, each tool window is by itself and cannot be docked when dragging around. These are identical to how Visual Studio works.


Actipro Software Support

Posted 16 years ago by Matthias Mueller
Avatar
okay, your explanation helped a lot.
When will we see the version with the enhanced API?

I would go for the overloading of the methods just I would like to see something like a AutoHideContainer or AutoHideWindows property at the DockSite with an additional value for Left, Right, Top, and Bottom.

Or even another idea to think about: leave all the AutoHide special treatment from the DockSite, simply make an extension method/property for the ToolWindow DockSite.AutoHide=true or an AutoHide property at the ToolWindow class and an internal handling/placing of the ToolWindow in the appropriate container.

-Matthias
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We are working as fast as possible to get the next beta release ready. This next build will be on the v4.0 codebase so it will be a full install with an updated SampleBrowser and new Docking QuickStarts. We're trying to get it out for mid next week. You also will see a preview of another v4.0 product in there.

We'll drop the "To" and do the method overloading.

Check out the DockSite.AutoHideLeftItems (although renamed to AutoHideLeftContainers in the next build), and the Top, Right, Bottom related collections.

Auto-hide really is its own type of state. There also is a 5th Document state for tool windows but we are still working on that related code.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.