Hello
Is there a way to put a popup menu with the allowtearaway property = true, to begin floating by code. It is to simulate the 'Drag to make this menu float' by code. Im using infragistics ver 6.2
Thanks in advance
Giovanny
Boris,
Everything is ok, thank You for take your time to help me with this.
Hello Giovanny,
Thank you for the details and the screenshot, really helped me!
Please take a look at the sample project attach to this post. I am also pasting my code here:
private void ultraToolbarsManager1_BeforeToolDropdown(object sender, BeforeToolDropdownEventArgs e)
{
if (e.Tool is PopupMenuTool)
if (!ultraToolbarsManager1.Toolbars.Exists("tearaway"))
PopupMenuTool tool = (PopupMenuTool)e.Tool;
e.Cancel = true;
ultraToolbarsManager1.Toolbars.AddToolbar("tearaway");
ultraToolbarsManager1.Toolbars["tearaway"].DockedPosition = DockedPosition.Floating;
ultraToolbarsManager1.Toolbars["tearaway"].FloatingSize = new System.Drawing.Size(200, 100);
ultraToolbarsManager1.Toolbars["tearaway"].Tools.AddTool("PopupControlContainerTool1");
ultraToolbarsManager1.Toolbars["tearaway"].Tools["PopupControlContainerTool1"].SharedProps.DisplayStyle = ToolDisplayStyle.TextOnlyAlways;
tool.Tools.RemoveAt(0);
}
Please feel free to let me know if I misunderstood you or if you have any other questions.
Hello Boris
Yes, I need to run a code that when I click on the PopupControlContainerTool, the menu becomes floating at once, instead the user drag to make the menu floating. Is there any option by code to achive this functionality?
Thank you
Is what you want to run a code in order to tearaway the PopupMenuTool? Could you please be more specific. Also, for your information - the mentioned version is very old and no longer supported.