Z-Order of DocumentWindow

Docking/MDI for WPF Forum

Posted 16 years ago by Wolfgang Hanke
Version: 4.5.0485
Avatar
Hello,

is there any possibiity to force a DocumentWindow to stay in background if activated?

Example in class MyDockSite: DockSite

protected override void OnActiveWindowChanged(DockingWindow oldValue, DockingWindow newValue)
{
base.OnActiveWindowChanged(oldValue, newValue);

if ((newValue is MyBackgroundWindow))
{
oldValue.Activate();
}
}

This Example does not work as expected, the newValue-Window ist still the active window.
What I want to achieve: I need a focusable Window as MdiBackground. If my background window has no focusable content, it stays in the back but if i add some focusable content i have to "deactivate" the activate-feature. Any hints or possibly a better solution to add content to your workspace background?

Wolfgang Hanke

Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Wolfgang,

Yes, the Open() method will open the docking window without focusing it. Activate() opens it AND focuses it. Hope that helps.


Actipro Software Support

Posted 16 years ago by Wolfgang Hanke
Avatar
My problem is: the DocumentWindow IS already open.

Background: DocumentWindow1 with 1 Button on it
Middle: DocumentWindow2 with 1 Button on it
Foreground: DocumentWindow3 with 1 Button on it

What I want: Click Button on DocumentWindow1 WITHOUT bringing it to front, clicking on Button of DocumentWindow2 WITH bringing it to front --> DocumentWindow1 always stays in the back

Any more hints?
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Wolfgang,

Hmmm, ok I think I see. You must be using standard MDI? If so I'm not sure you can prevent this since I believe the code in OnIsKeyboardFocusWithinChanged causes the window to become active. You could possibly try setting FocusManager.IsFocusScope=true on the window or on the window's content and see if that helps, but I'm not sure if it will or not.


Actipro Software Support

The latest build of this product (v24.1.3) 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.