ToolWindow with AutoHide are not hidden when backstage menu is shown

Docking/MDI for WPF Forum

Posted 4 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 19.1.0684
Platform: .NET 4.7
Environment: Windows 10 (64-bit)
Avatar

Hi,

when a tool window is visible where the property AutoHide is set and you open the backstage menu of the ribbons, the tool window is still visible on top of the menu. You can reproduce the issue in the sample browser with the "Simple IDE" demo. Just activate the "Find & Replace" window and open the popup menu with the overview of all the demos.


Best regards, Tobias Lingemann.

Comments (2)

Posted 4 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Okay, it looks like I have found a workaround:

Ribbon.IsApplicationMenuOpenChanged += Ribbon_IsApplicationMenuOpenChanged;

private void Ribbon_IsApplicationMenuOpenChanged(object sender, BooleanPropertyChangedRoutedEventArgs e)
{
  bool isContentVisible = !e.NewValue;

  foreach (var window in DockSite.DocumentWindows.Cast<DockingWindow>().Where(w => !w.IsFloating))
  {
    if (window.State == DockingWindowState.AutoHide)
    {
      window.IsOpen = isContentVisible;
    }
    else
    {
      window.Visibility = isContentVisible ? Visibility.Visible : Visibility.Collapsed;
    }
  }
}


Best regards, Tobias Lingemann.

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

Hi Tobias,

Yes I was going to suggest something along those lines, although DocumentWindows aren't tool windows and will never auto-hide.  You migh want to use the ToolWindows collection instead.

Another simpler thing you can do is just check the dockSite.PrimaryDockHost.IsAutoHidePopupOpen property when the app menu opens (use that same event).  If that property returns true, then call dockSite.PrimaryDockHost.CloseAutoHidePopup(true, false).


Actipro Software Support

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