How can I know that the Document Window Tab was clicked? Are there any event in DockSite?

Docking/MDI for WPF Forum

Posted 10 years ago by Hejian Lin
Version: 14.1.0602
Avatar

Hi Actipro Support

I need to tell the document window was selected by the user click (event the document window is the new created foreground window, when the user click the tab to active it for the first time). How can I do that?

Thanks

Comments (5)

Posted 10 years ago by Hejian Lin
Avatar

Hi Actipro Support

I have found the solution for it. In DockSite, there is a event LastActiveDocumentChanged, which is exact the one I am looking for. But still one problem. When one document window is close, one of the left document is activated automatically. Can it be configruable, which means that I can decide whether auto-active window, when document closed?

Thanks a million in advanced

Lin

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

Hello,

Unfortunately there isn't any external control over which document gets activated when another is closed.  It will basically be selecting the one next to it, and also activating it if the closing document was active.


Actipro Software Support

Posted 10 years ago by Hejian Lin
Avatar

Hello,

I have try all my best to find some work around to solve our problem, but none of them works. Could you please provide one property to stop "activating the document" on other document closed. For our case, we associated the document window with some phone calls. When the document was activated explicitly, we will answer the call. Every works perfectly, exceptly "closing document window". So the current behavior cause realy big problem for us. When the user close one document and the document next to the closing one was associated with an alerting call, then the call will be answered withour any user's attention.

Or any solutions are welcome.

Thanks a million in advanced

Lin

Posted 10 years ago by Hejian Lin
Avatar

Anybody can help me?

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

Here's an idea... The selected tab change occurs between the DockSite.WindowClosing and WindowsClosed events.  So if you handle those events, you could set a global flag in WindowClosing and clear it in WindowClosed.  While that global flag was set, you could ignore WindowActivated events.


Actipro Software Support

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.