Hi,
how can I prevent the 'PaneDeactivate' event of a dockmanager object, if the user clicked on a ribbon tool (e.g. combobox tool, font list tool, etc.).
This event is not fired (the active pane is not deactivated!), if the ribbon tool is a popup menu tool with buttons. Why is this behaviour not the same for the other tools?
Thanks,
Michael
Hi Milko,
that was not really my question, but I found a workaround for myself.
M
Hello Michael,
Thank you for posting in our forum.
This is expected behavior. Editor-based tools take focus in order to gain the keyboard input. What you can do here, as a workaround, is to set the AutoHideDelay property of the panes to some very big value, e.g. int.MaxValue. You can do this just before the tool enter in edit mode and return back the original value after the tool exit edit mode. You can use BeforeToolEnterEditMode and AfterToolExitEditMode events of UltraToolbarsManager to do so. You can use code like this:
private void UltraToolbarsManager_BeforeToolEnterEditMode(object sender, BeforeToolEnterEditModeEventArgs e)
{
// get the active pane
var activePane = this.ultraDockManager.ActivePane;
// check if there is active pane and if it is flayout pane
if (activePane != null && activePane.IsFlyoutPaneDisplayed)
// save the AutoHideDelay to a private field and set it to some big value
this.originalAutoHideDelay = this.ultraDockManager.AutoHideDelay;
this.ultraDockManager.AutoHideDelay = int.MaxValue;
}
private void UltraToolbarsManager_AfterToolExitEditMode(object sender, AfterToolExitEditModeEventArgs e)
// restore the original value of AutoHideDelay
this.ultraDockManager.AutoHideDelay = this.originalAutoHideDelay;
In the attached sample project I have implemented this approach. Please check my sample and let me know if you need any additional information.
Thank you for using Infragistics Controls.