Problem in the docking

Docking/MDI for WPF Forum

Posted 7 years ago by keshav bansal
Version: 12.1.0561
Avatar

Hi,

<Grid>

<docking:DockSite x:Name="Basedocksite1">

<docking:Workspace>

<docking:DockSite x:Name="BaseDocksite2">

<docking:Workspace>

<Grid><Grid.RowDefinitions><RowDefinition/><RowDefinition/><RowDefinition/></Grid.RowDefinitions>

<docking:DockSite x:Name="docksite1" Grid.Row="0">

<docking:ToolWindowContainer><docking:ToolWindow Title="toolwindow1"></docking:ToolWindow></docking:ToolWindowContainer></docking:DockSite>

<docking:DockSite Grid.Row="1" x:Name="docksite2">

<docking:ToolWindowContainer><docking:ToolWindow Title="toolwindow2"></docking:ToolWindow></docking:ToolWindowContainer></docking:DockSite>

<docking:DockSite Grid.Row="2" x:Name="docksite3">

<docking:SplitContainer><docking:ToolWindowContainer><docking:ToolWindow Title="toolwindow3"></docking:ToolWindow></docking:ToolWindowContainer>

<docking:ToolWindowContainer>

<docking:ToolWindow Title="toolwindow4"></docking:ToolWindow></docking:ToolWindowContainer></docking:SplitContainer></docking:DockSite>

</Grid>

</docking:Workspace>

</docking:DockSite>

</docking:Workspace>

</docking:DockSite>

</Grid>

and in the code behind i am setting

this.docksite1.LinkDockSite(Basedocksite1);

this.docksite2.LinkDockSite(BaseDocksite2);

Problem 1.

Case1:

When user drag the toolwindow1 and as it is linked to the basedockite1 and dock the toolwindow1 to the right of the docksite1.and docked position(right) is saved and whenever user close this toolwindow and again reopen the toolwindow using any button click it will dispaly on the dockedposition(right) of the basedocksite1 and then user drag the toolwindow2 and as it is linked to the basedockite2 and dock the toolwindow2 to the top of the docksite2.and docked position(top ) is saved and whenever user close this toolwindow and again reopen the toolwindow using any button click it will dispaly on the dockedposition(top) of the basedocksite1.Now Toolwindow2 is on the top of the toolwindow1.

Case2:

if user close the toolwindow2 and then close the toolwindow1.and then user click the button for toolwindow2 and as it will docked to the top position(docked position) of

the Basedocksite2 and then user will click the button for the toolwindow1 and as it will docked to the right position(docked position) of the Basedocksite.

Now the look is different means in the first case toolwinow2 was above of the toolwindow1 but in the second case toolwindow1 is rightof the toolwindoow2.

How we should do programming like toolwindow1 should be in the right of the basedocksite1 but below of the toolwindow2which is on the top of the Basedocksite2.

Problem2: In above sample toolwindow3 and toolwindow4 are in the same dockite so is

there any way so that toolwindow3 can't dock in to the toolwindow4 or viceversa.

Comments (3)

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


Hi Keshav,

We took a look at your code, but can't seem to reproduce your issue. We would need you to provide a simple sample project containing the problem to try and figure out what is going wrong. If you email us the project please rename any .zip files to avoid them being blocked as spam. However, we can say that the three levels of nested and linked DockSites is quite complicated and has a higher chance of causing problems in your application. You may want to think about a simpler design.

As far as your second question you can set the CanAttach() property of the ToolWindow to false to keep it from docking in a tabbed container with other windows.


Actipro Software Support

Posted 7 years ago by keshav bansal
Avatar

Hi,

CatAttch to flase for then toolwindow is also not working still i toolwindow3 is draggable into the toolwindow4 as they are in the same docksite.

Suppose i have toolwindow1 and toolwindow 2 in the docksite1 and if i run the application these toolwindows will displayed in the docksite1 and if i drag the toolwindow1 then the dockguide will be displayed in the toolwinodw2 and if i drag the toolwindow2 then dockguide will be displayed in then toolwindow1.Means toolwindow1 can be docked into the toolwindow2 and toolwindow2 can be docked into the toolwindow1 as they are in the same docksite but i want to block this .

Please give the code for the simple docking application that hav two simple toolwindows in the same docksite and if two toolwindows are in the same docksite then one toolwindow should not be docked into the other toolwindow.

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

Hi Keshav,

Changing the CanAttach property to false means that two tool windows can’t be dragged on top of each other to become tabbed. There isn't a way to prevent docking within one DockSite but allow it elsewhere; however, the documentation can help you decide what to do. I'd suggest starting under Topics>Actipro Docking & MDI>Docking Window Features> Docking Window Capabilities.


Actipro Software Support

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