This is a migrated thread and some comments may be shown as answers.

ToolStripDropDown shown from autohidden tool window

1 Answer 67 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Luc
Top achievements
Rank 1
Luc asked on 06 Mar 2014, 12:44 PM
Here is a tricky case.

I am showing a ToolStripDrowDown "from" a ToolWindow. I am aware ToolStripDropDowns are actually forms, not subcontrols, so that showing them from a control is loosely defined from a technical point of view. What I mean is that in reaction to a user action in a control inside the toolwindow, I display the toolstripdropdown next to this control.

The ToolStripDropDown contains a focusable control.

Here is the problematic scenario:
- the tool window is in autohide mode
- the user selects the toolwindow
- the user causes the toolstripdropdown to be displayed
- the user clicks inside the focusable control in the toolstripdropdown
- logically, the toolwindow loses focus and is hidden.

I am aware this is a perfectly logical behaviour by RadDock, but I am looking for a workaround. Any idea would be greatly appreciated.

PS: I am opened to giving up on ToolStripDropDowns. I am using it to provide a kind of light, unintrusive, dialog box, meaning it's not modal and automatically disappears whenever the user clicks somewhere else in the application. It's kind of a kludge, but it's been mostly satisfactory till now.

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 11 Mar 2014, 08:50 AM
Hello Luc,

Thank you for contacting us.

You can use the AutoHideWindowHiding event of RadDock and cancel it, this way the window will not auto-hide:
this.RadDock.AutoHideWindowHiding += new Telerik.WinControls.UI.Docking.DockWindowCancelEventHandler(RadDock_AutoHideWindowHiding);
void RadDock_AutoHideWindowHiding(object sender, Telerik.WinControls.UI.Docking.DockWindowCancelEventArgs e)
{
    e.Cancel = true;
}

Let me know if you have further questions.

Regards,
George
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
Dock
Asked by
Luc
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or