Switching between tabs (DockingWindows) in a TabbedMdiContainer is slow

Docking/MDI for WPF Forum

Posted 4 years ago by Paul McArdle
Version: 14.2.0611
Avatar

Hi,

My company has been evaluating a number of different docking frameworks to use in our product, and for the most part, your control suits our needs the best. However, we are finding that your control is noticeably slower when changing the active tab inside a TabbedMdiContainer compared to the native WPF tab control and a competitor's control (set up as close to identically as possible).

To be clear: we have 9 DockingWindows docked in a TabbedMdiContainer. The first time we click on each of the tabs they are slow to load, as is expected, especially for the tabs containing more complex views (the WPF tab control and your competitors are also slow). However, the second time we click on each of the tabs, the built-in WPF tab control and some of the competing docking managers are very fast; your control, in comparison, has a noticeable delay for the more complex views.The delay is less than the first time the tabs are visited, but still slow compared to the alternatives.

I am already setting ItemContainerRetentionMode="Wrapped".

This seems similar to a problem reported a number of years ago: http://www.actiprosoftware.com/community/thread/20403/switching-between-tabs-in-a-docking-window-is#101446

I have included the xaml and code behind that I am using to construct the DockSite.

Any help would be greatly appreciated, as otherwise we will need to choose a different control.

Thanks a lot!

View

<docking:DockSite x:Name="DockSite" 
  ToolWindowsTabPlacement="Top" 
  CanDocumentWindowsRaft="True" 
  IsLiveSplittingEnabled="True" 
  WindowDragged="DockSite_OnWindowDragged" 
  WindowClosed="DockSite_OnWindowClosed" 
  CanDocumentWindowsEditTitles="True" 
  ItemContainerRetentionMode="Wrapped" 
  DocumentItemsSource="{Binding RHSViewModelMap}" 
  WindowRegistered="DockSite_OnWindowRegistered">

  <docking:DockSite.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="DataTemplates.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </docking:DockSite.Resources>

  <docking:Workspace>
    <docking:TabbedMdiHost>
      <docking:TabbedMdiContainer>
      </docking:TabbedMdiContainer>
    </docking:TabbedMdiHost>
  </docking:Workspace>

</docking:DockSite>

 

Code Behind:

private void DockSite_OnWindowRegistered(object sender, DockingWindowEventArgs e)
{
  DockSite dockSite = sender as DockSite;
  if (dockSite == null)
    return;

  // Ensure the DockingWindow exists and is generated for an item
  DockingWindow dockingWindow = e.Window;
  if (dockingWindow == null || !dockingWindow.IsContainerForItem)
    return;

  dockingWindow.Title = ((INamedViewModel) dockingWindow.DataContext).Name;

  if (!dockingWindow.IsOpen)
  {
    dockingWindow.MoveToMdi(dockSite);
  }
}

[Modified 4 years ago]

Comments (2)

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

Hi Paul,

Can you make a new simple sample project that shows the slowness so that we can debug and profile it?  Ideally it would also have a comparison to the native WPF TabControl too.  Please email it to our support address, mention this thread in your email, and rename the .zip file extension of what you send so that it doesn't get spam blocked.  Thanks!


Actipro Software Support

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

Thanks for the sample.  We think we found the problem area that was causing the slowdown in this case and have updated it for the upcoming 2015.1 version.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) 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.