Making a docking window trap and hold focus until it is closed?

Docking/MDI for WPF Forum

Posted 12 years ago by Austin Spears
Version: 11.2.0553
Avatar

Hey,


There is a section of our application that comes up as a window and wont let you click or do anything else in the application until it is closed / resolved (modal window).  However, instead of having this area of the app as a window we have decided to create a new docking window to keep the feel natural (As opposed to having a new window popup and demand / trap focus).  The problem is we would still like to have the behavior of locking focus when this docking window is created (and its associated contextual tab).

 

I have been having trouble finding a way to do this; if you guys had any idea or could tell me if this is not feasible that would be amazing.

 

edit - I suppose I could hide the tabstrip etc, but that wouldn't prevent shortcut keys from bringing up other things...

 

edit - I have kind of achieved what I want by iterating through the Documents collection and setting IsEnabled to false for the other tabs, but I feel that this is hackish.

[Modified 12 years ago]

Comments (2)

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

Hi Austin,

You might be able to do some form of transparent overlay on your Window to catch mouse clicks over the rest of the app.  It would have to have a null background area (or a clip) that covered the location of the active tool window.  That may be tricky.

But that wouldn't handle cases where there was another already floating tool window (if any).  You'd also need to probably trap various hotkeys while in this mode.

Or as you said by disabling everything.


Actipro Software Support

Posted 12 years ago by Austin Spears
Avatar

Makes sense, too bad there isn't a simple solution like setting a modal property.  I understand why that isn't possible now though.  Thanks for the quick reply!

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