Docking/MDI for WPF Forum

Posted 15 years ago by Iosu Buenetxea

I have a dockSite with a TabbedMdiHost and a TabbedMdiContainer. At runtime, people can make new TabbedMdihost (and spliters come too). The thing I need is to know the ActiveDocument at any time. I could know the dockSite.ActiveWindow but the ToolWindows are windows too. I see also there is the dockSite.LastActiveDocument...but I can't find something as dockSite.ActiveDocument.
What's the best approach to do it?
Thanks in advance,

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
I believe LastActiveDocument will contain the currently focused document if you are in one. The logic we typically use to get the primary document is:
DockingWindow window = this.LastActiveDocument;
if (window == null)
    window = this.FindFirstDocument();

Actipro Software Support

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