ToolWindow - Identifying Closed Window

Docking/MDI for WPF Forum

Posted 14 years ago by Bret Naughton
Version: 10.1.0522
Avatar
I have developed an application that allows the user to dynamically add toolwindows containing appropriate user content - I am displaying these in an inner fill. What I would like to do is identify the toolwindow that the user has decided to close through the close 'x' on the individual tool window title bar. Unfortunately I am having no luck in this.

I have an WindowClosingEvent set up that is successfully triggered when the toolwindow closed button is pressed, and in the code of the event I have used the ActiveWindow property to identify the closed toolwindow. This works OK if the toolwindow that is closed originally had focus/was active and highlighted. However, if I am closing a toolwindow that is not currently highlighted, the ActiveWindow is not set to the closed/triggered toolwindow.

Within the same event code, I have also tried looping through toolWindows and checking which element/toolwindow 'isSelected' but no luck, as all toolwindows onscreen are set to be Selected.

Please let me know if there is an easy way to identify the closed toolwindow. If there is an issue with doing this, is there a way to remove the close button from the toolwindow title bar, and therefore I can create my own close button in the ribbon bar/etc. to close only the toolwindow that is highlighted?

Thanks

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bret,

Sorry for the late response. You should be able to check the Window property of the event arguments for the associated ToolWindow.


Actipro Software Support

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