Unable to AutoHide.

Docking/MDI for WPF Forum

Posted 7 years ago by keshav bansal
Version: 12.2.0572
Avatar

Hi,

While clicking on the AutoHide icon of the toolwindow ,i am getting the belowed exception window.

{"Unable to locate the specified control in the AutoHideHost."}

belowed code is used inside the windowStateChange of that docksite.

if (e.Window.State.ToString() == Constants.AutoHide)

{

ToolWindowContainer con = newToolWindowContainer();

if (toolWindow.Parent != null){

ToolWindowContainer ablContainer = toolWindow.Parent asToolWindowContainer;

if (ablContainer != null){

ablContainer.Items.Remove(toolWindow);

con.Items.Add(toolWindow);

toolWindow.CanAutoHide =true;

baseDocksite.AutoHideRightContainers.Add(con);

}

}

}

Comments (1)

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

Hi Keshav,

That event may firing before everything is finalized for the layout update.  But regardless, the code you are executing isn't good since it will interfere with other things we track internally.

Instead of what you are doing, you can call ToolWindow.AutoHide(Dock.Right), although you may want to "dispatch" it to occur out of band from the WindowStateChanged event handler.


Actipro Software Support

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