Toolwindow Direction

Docking/MDI for WPF Forum

Posted 16 years ago by Rene Colmenares
Version: 4.0.0455
Avatar
Is there way to programmatically determine the direction of a Toolwindow?

Comments (7)

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

I don't believe so at the moment. Can you go into some detail on what you need and how you would intend to use it? That would help us sort out how to best accommodate you. Thanks!


Actipro Software Support

Posted 16 years ago by Rene Colmenares
Avatar
We're in the process of designing a composite application shell which will provide facilities for loading toolwindows. One of our required behaviors is for a new toolwindow to attach themselves to an existing toolwindow opened at the same location (direction). While you provide the ability to attach a window to an existing window by name, we can't utilize that logic because we don't know where it is.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If I understand correctly, you just want to know which Dock side that a tool window is located in relation to the Workspace.

So something like a new ToolWindow.GetWorkspaceDirection() method would be what you need? It could return a Direction.

If Docked or in AutoHide, it could return one of the four directions. If the tool window is a Document, it could return Content. And if Floating or Undocked it could return None. Would that be sufficient?


Actipro Software Support

Posted 16 years ago by Rene Colmenares
Avatar
Yes, that would be sufficient.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok ToolWindow.GetDirectionRelativeToWorkspace method will be in the next release.


Actipro Software Support

Posted 15 years ago by John Taylor
Avatar
What if you dont have a workspace in the docksite.
I'm trying to work out the direction of a toolwindow so I can change the content based on the position (set the content stackpanel orientation based on the dock position etc)
There doesn't seem to be any method of getting the direction based on the parent object.

It would be good if you could tell if a toolwindow was docked Top,bottom,Left,Right,Center, collapsed etc.

I've tried GetDirectionRelativeToWorkspace, but as I said...my docksite doesn't have a workspace.

thanks
John
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
John,

When there is no workspace, you have no frame of reference so there is no true direction you can know.

If you want to do a best guess you could go up the control hierarchy and look at which SplitContainers contain the tool window container. Look at their orientation etc. until you hit the DockSite.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.