Restore docking information for docked windows

Docking/MDI for Windows Forms Forum

Posted 13 years ago by Unknown
Version: 2.0.0112
Avatar
Hi,

we're trying to port an old application to the Actipro UIStudio.

The project files that are loaded in our application contain window information (type of window, position etc.) for the several windows the user configured before saving the project file.

The window information can be saved in any order in the project file and it should be possible to even load the windows in any order and make sure that the windows are docked to the correct position. With our old framework this was possible. The old framework allowed docking in four docking areas (left, right, top, down), which where divided in columns and rows. So saving the docking area, the column and the row was sufficient information to restore the windows in any order and get them on the correct docking position:

------------------------------------------------------------
| C:0                                                      |
| R:0                                                      |
|-----------------------------------------------------------
| C:0   |C:1    |                         | C:0    | C:1   |
| R:1   |R:0    |                         | R:0    | R:0   |
|       |       |                         |        |       |
|       |       |                         |        |       |
|       |-------|                         |        |-------|
|       |C:2    |                         |        | C:1   |
|       |R:1    |                         |        | R:1   |
|       |       |                         |        |       |
|       |       |                         |        |       |
|-----------------------------------------------------------
| C:1                                                      |
| R:1                                                      |
------------------------------------------------------------
| C:0                       | C:0                          |
| R:0                       | R:1                          |
|-----------------------------------------------------------
Now we are porting to UIStudio and of course we want to use the much better hierarchical and more complex docking functionality. But we would like to use the same approach and save the docking information together with the window information in our project files.

Again, the order in which the windows are saved and restored is arbitrary and we're not sure which information has to be saved and which API-functions can be used to restore the correct layout. Using the XML-File written by UIStudio is not an option, because the docking information for each window should be in the project file along with the other window information.

Have you had any experiences with requirements like this?
Could you please support us with this problem?

Thanks in advance

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Gianfranco,

Sorry we've not had any users with requirements like that. Unfortunately I'm not sure how you'd do this since our layouts store how all the windows are relative to each other and it persists the hierarchy information.

To do your sort of thing, you might need to manually scan the control hierarchy and derive rol/column information. But even then, restoring windows individually would be difficult. Our framework allows you to dock windows relative to other windows and containers, but it it would require some very complex custom logic to look at row/cols and what is already visible in the UI, and figure out how to do those docking calls.

An easier way would be to persist our XML layout data in your project file directly somewhere and use that, instead of with the project data for each individual window.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.