Event for focus changed?

Docking/MDI for WPF Forum

Posted 10 months ago by Andrea
Version: 23.1.0
Avatar

Version=20.1.1.0

            <docking:DockSite Name="m_scriptEditorDocSite">
                <docking:Workspace Name="m_scriptEditorWorkspace">
                    <docking:TabbedMdiHost  Name="m_scriptEditorTabbedMdiHost">
                        <docking:TabbedMdiContainer Name="m_scriptEditorTabs"
                        >
                        </docking:TabbedMdiContainer>
                    </docking:TabbedMdiHost>
                </docking:Workspace>
            </docking:DockSite>

In the code behind of this XAML, how can I subscribe to when the user focuses on a different tab? I'm dynamically assigning `DocumentWindow`s to `m_scriptEditorTabs`?

Comments (3)

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

Hello,

This section in the documentation gives information about how to get notified for active window changes.

On a side note, while you can name the DockSite and TabbedMdiHost, you should never name or directly access a container like TabbedMdiContainer since those are dynamically created and destroyed on layout changes.


Actipro Software Support

Posted 10 months ago by Andrea
Avatar

Thank you! So, if I want to add DockingWindows to the TabbedMdiContainer programmatically, how would you recommend adding them?

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

If you create the document window using a constructor that associates it with a DockSite, then just call window.Open() or window.Activate() (if you want it focused as well) and it will open in tabbed MDI.


Actipro Software Support

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