Window Activated event not raised when changing the document window from the same docked tab group

Docking/MDI for WPF Forum

Posted 9 years ago by CV
Version: 15.1.0622
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Avatar

Hi,

The problem is that I have a DockSite containing a SplitContainer, containing a TabbedMdiHost, containing a TabbedMdiContainer. See sample below.

We use MVVM to add/remove the document windows of this dockSite.

We also use a DockSiteViewModelBehavior, which is a Behavior<DockSite> to manage event handlers for widown activation (AddHandler AssociatedObject.WindowActivated, AddressOf OnDockSiteWindowActivated, where AssociatedObject is the DockSite itself)

 

The issue is the WindowActivated event is not raised when I switch to another document window that behaves to the same (horizontal or vertical) tab group. More precisely, if I switch to another document window located at an another tab group, the event is raised well. Even more precisely, for two document windows in the same tab group, the Window Activated will be raised right after if, for example, I right-click on the tab header to make appear the context menu.

That makes me think the issue may be a LostFocus one.

 

What really bugs me is that this bug has occurred since the version 2015.1.621. Consequently, we are unfortunately stuck to the version 2014.2.61, while we have just purchased our 1-year renewal until July 2016.

Have you recently added a new property I should set at my DockSite level? or anything new in your latest API that can help me fix my bug?

 

Thanks by advance for your answer.

Have a good day.

Cyril.

 

<docking:DockSite x:Name="m_dockSite" x:FieldModifier="private" 
                  CanDocumentWindowsRaft="True" CanRaftingWindowsCloseOnDockSiteUnload="False"
                  DocumentItemsSource="{Binding ProfileItems, Mode=OneWay}"
                  DocumentItemContainerStyle="{StaticResource ProfileItemStyle}">
        
        <i:Interaction.Behaviors>
            <vw:DockSiteViewModelBehavior x:Name="m_dockSiteViewModelBehavior" x:FieldModifier="private" />
        </i:Interaction.Behaviors>
        
        <docking:DockSite.AutoHideLeftContainers>

            <docking:ToolWindowContainer docking:DockSite.ControlSize="400,0">
                <ToolWindow ... />
            </docking:ToolWindowContainer>

            <docking:ToolWindowContainer docking:DockSite.ControlSize="300,0">
                <ToolWindow ... />
            </docking:ToolWindowContainer>

            <docking:ToolWindowContainer docking:DockSite.ControlSize="360,0">
                <ToolWindow ... />
            </docking:ToolWindowContainer>

        </docking:DockSite.AutoHideLeftContainers>
        
        <docking:DockSite.AutoHideRightContainers>
            
            <docking:ToolWindowContainer docking:DockSite.ControlSize="800,0">
                <ToolWindow ... />
            </docking:ToolWindowContainer>
            
            <docking:ToolWindowContainer docking:DockSite.ControlSize="400,0">
                <ToolWindow ... />
            </docking:ToolWindowContainer>
        
        </docking:DockSite.AutoHideRightContainers>

        <docking:SplitContainer>
            
            <docking:ToolWindowContainer docking:DockSite.ControlSize="320,0">
                
                <ToolWindow ... />

                <ToolWindow ... />

                <ToolWindow ... />

                <ToolWindow ... />

            </docking:ToolWindowContainer>

            <!-- This displays the profile items for one profile. -->
            <docking:Workspace>
                <docking:TabbedMdiHost IsImageOnTab="True">
                    <docking:TabbedMdiContainer />
                </docking:TabbedMdiHost>
            </docking:Workspace>
        
        </docking:SplitContainer>
    
    </docking:DockSite>  

Comments (2)

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

Hi Cyril,

We have tried to repro this scenario you mention in our samples (with multiple documents in multiple containers) and always see the WindowActivated event firing no matter whether another document is selected in the same or a different tab group.  We're not aware of any issues in this area.

The activation of documents does follow where the focus is, so could it be that your child controls are some that don't properly accept/report WPF focus?  Do you use interop controls?  If you are using any HwndHost-based child controls, have you set our InteropFocusTracking.IsEnabled="True" attached property on them?

If you'd like use to look into it further, please make a new very simple sample project that shows the issue so that we can use that to debug it.  Send that to our support address in a renamed .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 9 years ago by CV
Avatar

Hi guys,

I have just sent you a code sample from my private ticket space.

Hope it helps. Have a good day.

CV.

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.