child tool window should not be closed when base tool window is closed

Docking/MDI for WPF Forum

Posted 7 years ago by maddy
Version: 12.2.0570
Avatar

Hi ActiPro Team,

 

The problem I am facing is I do have Three Tool Window ,which is imposed on a single base tool window.

Now these tool windows are added in the different regions,which can be removed when required.

My condition is :-

First I float child  tool window outside the base tool window, after that I remove two remaining tool windows from their respective regions. As a result base tool window gets collapsed and floated tool window remains at the same place where ever it had been floated because it was not removed from the region in which it was added.

 

But When I dock the complete tool window to a different position,and I follow the same process as described above. Floated tool window remains at the same place where ever it had been floated but base tool window does not get collapsed and a blank region appears over there. Only the two other child tool windows move out of base docksite. So I want to close the base tool window and floated tool window should not close.

 

Whst should be done..please suggest.

Comments (5)

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

Hi Maddy,

Sorry this is a bit of a complex scenario and would help if you provided us with a simple sample project showing it.  But in general, if you are nesting DockSites, which it sounds like you are doing, then closing a tool window that contains the nested DockSite will close tool windows from the nested DockSite.  That is by design and can't really be worked around.  If you don't like that behavior then you shouldn't use a nested DockSite design.


Actipro Software Support

Posted 7 years ago by maddy
Avatar

Okkay I do agree.

The  child tool window which I have floated earlier is being closed only on closing the base tool window.

So can I save the state of that tool window and again childToolWindow.Float(locationOfToolWindow, sizeOfToolwindow) can locate the position of that child window at the same location.

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

Hi Maddy,

You could do that but it would probably be easier to use our layout serialization feature to save the layout and restore it again later.  Layout serialization is described in the documentation and there are some examples in the samples too.


Actipro Software Support

Posted 6 years ago by keshav bansal
Avatar

But again it is attached with the parent docksite or parent Tool window. I am able to do this, when it comes to a single tool window. But here I have a case of multiple parent child tool window as I explained earlier. So whenever I close the main tool window,childToolWindow.Float(locationOfToolWindow, sizeOfToolwindow) can not retain the existence of child tool window at the area whereever it was floated initially.

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

If I understand correctly and your tool window you are closing has a nested DockSite that contains other floating child tool windows, then those child tool windows will close when the main root tool window is closed.  There is no workaround for that since the nested DockSite is being removed, due to its containing tool window being closed.  If you don't want the rafted inner tool windows to close then you'd need to move them to another DockSite that is remaining open.


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.