Activate programmatically tool window with AutoHide

Docking/MDI for WPF Forum

Posted 11 years ago by CA-AchatsInternet - Ubisoft Divertissements Inc
Version: 12.2.0571
Avatar

Hi,

I have a bunch of collapsed windows (AutoHide in Actipro terms) and I'd like to "un-hide them temporarily" from my code, when some specific thing happens in my application. I got it to work that way by calling Activate() on my toolwindow when its state is AutoHide, but I'd like to also have the inverse behavior, when it is "temporarily displayed" (i.e. after I called Activate on it and it has not been auto-hidden again yet) : I guess calling AutoHide() on it again while it's in that state would put it back in place. 

Unfortunately, to my understanding, AutoHide is true whether the tool window is currently hidden or not, which prevents me from detecting properly if I should call AutoHide or Activate on it. Basically, I'd need another boolean, telling me - while in AutoHide mode - whether the window is currently "active" or not. Does such a thing exist?

 

Thanks for your help.

Comments (4)

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

Hi Elodie,

You'd be better off calling dockSite.AutoHideHost.Deactivate(true).  That will make sure anything that is actively showing will close up.


Actipro Software Support

Posted 11 years ago by CA-AchatsInternet - Ubisoft Divertissements Inc
Avatar

Hi thanks for the answer.

But it doesn't solve the issue, which is : I want to know if the "auto-hidden" toolwindow is "active" (or showed, for lack of a better word), so that I can then call dockSite.AutoHideHost.Deactivate(true) and effectively hide it, or not "active" (only its "header" is visible into the AutoHideHost but it's not visible), so that I can call Activate on it, as if the user clicked on the "header" in the AutoHideHost (sorry for my poor vocabulary ;). 

I tried to look into the properties of dockSite.AutoHideHost.Popup, assuming Popup was the element that corresponds to the window that appears when the toolwindow is active, but didn't find any significant difference in its properties between a auto-hidden window that is currently "active" and another that is currently "inactive" (except its internal _size property, which must be inherited from FrameworkElement or UIElement, which is 0,0 when "inactive" and seems to be non-zero otherwise)

Is there a simple way to query that toolwindow state?

 

Thanks,

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

Hi Elodie,

I believe you can look at dockSite.AutoHideHost.Popup.ChildDockingWindowContainer and see if that is populated to know if the auto-hide is open in a flyout.  If it is, then the SelectedWindow of that container should be what is visible.


Actipro Software Support

Posted 11 years ago by CA-AchatsInternet - Ubisoft Divertissements Inc
Avatar

Hi,

 

Thanks a lot for your help, that was exactly what I needed!

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

Add Comment

Please log in to a validated account to post comments.