How to persist and deserialize z-order for standard MDI

Docking/MDI for WPF Forum

Posted 10 years ago by Brian Miller
Version: 9.1.0505
Avatar
How do I persist and "unpersist" the z-order in standard MDI? I tried using the Items property of StandardMdiHost, but the order in the Items property doesn't change as the z-order changes.

In other words, where can I get and set the z-order?

Comments (6)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Brian,

The Panel.ZIndex attached property is currently used to provide z-order. So you may be able to get/set that.


Actipro Software Support

Posted 10 years ago by Scott Lee
Avatar
Pardon my ignorance, but where do I find Panel.ZIndex? Along that line is there a way to get the StandardMdiHost's children in Z-Order?
Posted 10 years ago by Scott Lee
Avatar
Is it correct that DockSite.DocumentWindows.ToArray(true) returns an array is zordering?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Scott,

The Panel.ZIndex is an attached property. So you can get the current z-index from a document using "(int)documentWindow.GetValue(Panel.ZIndexProperty)". But this is only really used to bring the selected window to the front.

The LastFocusedDateTime is really what is used to determine the order that the windows have been "selected". So your code above should be correct.


Actipro Software Support

Posted 10 years ago by Scott Lee
Avatar
Seems that DocumentWindows.ToArray(true) has not been properly resolved when the WindowActived event is fired. In other words, in an event handler for WindowActivated, DocumentWindows.ToArray(true) does not show DockSite.ActiveWindow as the top most window. Can this be fixed?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Scott,

We've corrected this for the next maintenance release.


Actipro Software Support

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