Hi,
It is not possible to add a ControlContainerTool to a PopupMenuTool. Why???If I add the PopupControlContainerTool, I get an extra level in the menu to click on, and the control innside is alone (e.g. I cannot add other, normal Tools to it). Why is this? It's sure makes it harder for the user (and the developer!).
As mentioned in the following article from the online help (ControlContainerTool Class), the ControlContainerTool cannot be added to the Tools collection of a menu (PopupMenuTool and ApplicationMenuArea ). I would suggest you to use the PopupControlContainerTool and assign as its control a control that is container of other controls (custom control or for example panel as in the attached sample)
Let me know if this is helpful for you.
Regards,
Stefaniya
Yes, as I mentioned, that did work, but it adds an extra menu level (an extra click to the user). Not very usability-friendly.
On my machine the popupMenu and the popupControlContainer tools behave the same way and are on in one level. If you mean that the menu does not popup on hovering with mouse, you can try the following:
void popupControlContainerTool_BeforeToolActivate(object sender, CancelableToolEventArgs e)
{
PopupControlContainerTool pucc= e.Tool as PopupControlContainerTool;
pucc.DropDown();
}
Let me know if this works for you.
Best Regards,
No it does popup. It's like this:
If this is one menu structure:
PopupMenu- ButtonTool- ButtonTool- PopupMenu |-> Button Tool |-> Button Tool- ButtonTool- PopupControlContainer |-> CustomControlI cannot add CustomControl after -ButtonTool, it must be under PopupControlContainer, and this adds an extra click just to show an extra field\control
After I have asked our developers, it occurs that there is a way to use the ControlContainerTools in a PopupMenuTool as you have to create a custom ControlContainerTool derived from the original and override its IsVisibleOnMenus property to return true.
Thanks! :)
You guys should make this a public property on the original control :)