How can I get the state of a toolwindow

Docking/MDI for WPF Forum

Posted 14 years ago by hzhiwei
Version: 10.2.0351
Avatar
Excuse me,how can I get the state of a toolwindow before or after “mouseover”,such as expand、wrap。

And how can I catch an event when click the AutoHide button?

Comments (6)

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

We don't currently have events that are fired when the auto-hide flyout is opened/closed. I've added this forum post to our TODO item for this feature, so you will be notified when it's completed.

The auto-hide tabs are represented by the AutoHideTabItem type. So you can add a PreviewMouseLeftButtonDown event handler on the DockSite (or another element above it in the visual tree), then look for that type as the e.OriginalSource.


Actipro Software Support

Posted 14 years ago by hzhiwei
Avatar
Sorry,I had tried to add a PreviewMouseLeftButtonDown event handler on the DockSite,but I haven't catch a AutoHideTabItem type as the e.OriginalSource.

Please help me to confirm and send the source code to me, thank you!
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry, you're right. You would either need to add a class event handler for the AutoHideTabItem type, or in your DockSite handler iterate over the descendents and see if the mouse is over any AutoHideTabItems. You can use our VisualTreeHelperExtended to gather all the AutoHideTabItems, but the class handler is probably the better bet.

More info on class handlers: http://msdn.microsoft.com/en-us/library/ms747183.aspx#Class_Handlers_and_Instance_Handlers


Actipro Software Support

Posted 14 years ago by hzhiwei
Avatar
OK,thanks.
Now I only want to konw how can I catch an event when I click the AutoHide button?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

You would probably have to restyle the ToolWindowContainer and replace the DockingCommands.ToggleWindowAutoHideState command with a custom command. The ToolWindowContainer currently handles the DockingCommands.ToggleWindowAutoHideState, so you wouldn't be able intercept it. We don't currently have an event with a ToolWindowContainer/ToolWindow is auto-hidden, but I've added this forum post to the associated TODO item so you will be notified when it's completed.


Actipro Software Support

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

Hello, we have added new events so that you can be notified of when an auto-hide popup (flyout) is opening or closing.  These events will be part of the future 2014.1 version.  Please see this blog post for details:

http://blog.actiprosoftware.com/post.aspx?id=2f4c6b04-1cb1-4308-9349-911e6ae17392

[Modified 11 years ago]


Actipro Software Support

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