How to dynamically hide the DockGuide for the particular toolwindow inside the docksite.

Docking/MDI for WPF Forum

Posted 8 years ago by keshav bansal
Version: 11.2.0553
Avatar


Hi,

Can i hide the dockguide opened for the toolwindow when i dock the other toolwindow inside the first toolwindow.

ForExample :I have four usercontrols and these are registered as the toolwindows inside the docksite acts as the region with the help of the PrismIntegration with doccking .

Code for above is :

<docking:DockSitex:Name="MainRegion" AllowDrop="True" CanDocumentWindowsRaft="False" cal:RegionManager.RegionName="MainRegion">

</docking:DockSite>

I can dock the any of the toolwindoiw inside any of the toolwindows and similarly four dockguides are opened for the individual toolwindows.

I want to dynamically hide the dockguide for the particular toolwindow(Usercontrol) and these usercontrols should be registered as the toolwindows with the help of the PrismIntegration with docking .

Comments (5)

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Keshav,

This sounds like the same question you asked here. Currently, we only provide the various Can* properties, both on the DockSite (for global configuration) and on the DocumentWindow/ToolWindow (for instance level configuration). So you can set the various CanDockBottom, CanDockTop, CanDockLeft, CanDockRight, etc properties to false on a specific ToolWindow to prevent it from being docked in those positions by the end-user.


Actipro Software Support

Posted 8 years ago by keshav bansal
Avatar

But in the sample Custom Docking of the Actipro Sample Browser,

There are three tool windows namded(Custom Tool Window1,Custom Tool Window2,Custom Tool Window3) and two document windows named(Custom DocumentWindow1,Custom DocumentWindow2).

As i can easily dock and float any of the tool windows in any of the other toolwindow and any of the document windows.

But i can not dock the any document window  in any of the tool window ,When i drag  any document window and move that in to any of the tool window then docckguide is not opening ,thats what i want in my sample application.Means dockguide is not opening for the document windows in the toolwindows.

My requirement is like consider i have 4 tool windows and i want to fix any one  toolwindow that dockgude for the other rest three tool windows should not open in the fixed tool window.

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Keshav,

That is correct, DocumentWindows are different than ToolWindows. DocumentWindows can be currently only be docked in the MDI area or floated into a new window (of which the DocumentWindow can be the only child). You cannot dock DocumentWindows around the MDI and/or unpin them. ToolWindows can be docked anywhere in the DockSite (per the Can* properties) including into groups. In addition, they can be floated into a separate window (of which other ToolWindows can be docked). This mimics the behavior seen in Visual Studio 2010.

As we mention in this question, the Fixed ToolWindow QuickStart shows how you can create a ToolWindow that other ToolWindows cannot dock into.


Actipro Software Support

Posted 8 years ago by keshav bansal
Avatar

Hi,

As shown in the FixedToolWindow QuckStart,There are six toolwindows named(ToolWindow1,ToolWindow2,ToolWindow3,ToolWindow4,ToolWindow5,ToolWindow6) and the fixed toolwindow and CanAttach and the Can Drag properties are set to false for this fixed tool window.

But in this case also i can dock the any of the six  toolwindows in this fixed toolwindow.

Dockguide is still visible for the fixed toolwindow when i am docking the any of the six toolwindows in this fixed tool window.

 

My requirement is like consider i have 4 tool windows and 1 fixed tool window then any of the 4 toolwindows should not docked in to the 1 fixed tool window.

Answer - Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Keshav,

The six ToolWindows cannot be docked "in" the fixed ToolWindow. They can be docked around it (i.e. above, below, to the left, or to the right). Docking in (or on) the fixed ToolWindow requires the center (or content) dock guide to be enabled, which it is not.

When starting the sample, you can drag Tool Window 1 over the MDI area (where Document1.txt is shown) and drop it on the far right dock guide. This effectively docks Tool Window 1 to the left of the fixed ToolWindow, and is the same result as if you were to drag Tool Window 1 over the fixed ToolWindow and drop it on the far left dock guide.

So in that sense, it does not make sense to say "Tool Window 1" cannot be docked around the fixed ToolWindow, because that requirement would not be enforcable (as you can dock it around the fixed ToolWindow using another approach as described above).

Things get even more complicated when you consider that other ToolWindows can be removed. Let's assume we are able to say that Tool Window 1 cannot be docked around the fixed TW, but Tool Window 2 can be docked around the fixed TW. I could then drag Tool Window 2 and drop it to the left of the fixed TW, then drag Tool Window 1 and drop it to the left of Tool Window 2. So I currently have "TW1|TW2|FixedTW". I could then float Tool Window 2, and Tool Window 1 would have to be moved next to the fixed ToolWindow thus violating that requirement.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) 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.