Setting DockSite.CascadeDocuments order

Docking/MDI for WPF Forum

Posted 4 years ago by rex hui
Version: 19.1.0685
Avatar

How is the order determined in DockSite.CascadeDocuments?

Similar question for TileDocumentsHorizontally and TileDocumentsVertically.

How do we change that?

Thanks,

Comments (4)

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

Hi Rex,

For Cascade, the order is done by the docking window's LastActiveDateTime.  Unfortunately that property is publicly read-only right now.  Activating a docking window will update its LastActiveDateTime.  While we don't specify a secondary sort for when docking windows that have the same LastActiveDateTime, I believe it will be the order they appear in the StandardMdiHost.Windows collection, since that is what we call the OrderBy on.

For the Tile operations, those are done purely by the order in which the docking windows appear in the StandardMdiHost.Windows collection.


Actipro Software Support

Posted 4 years ago by rex hui
Avatar

Thanks. Is there any workaround to control the order for both the cascade and tile operations?

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

Hi Rex,

Not at this time other than possibly altering the Windows collection but we haven't tried that.  What did you have in mind?


Actipro Software Support

Posted 4 years ago by rex hui
Avatar

Thanks. I figured out a dirty workaround:

Use reflection to set the LastActiveDateTime value according to our ordering logic.

It will then work for the cascade operation.

For the tile operation, just do an extra cascade operation prior to the tile operation.

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

Add Comment

Please log in to a validated account to post comments.