Hello!
I have a pop up menu tool in a ribbon menu that contains a lot of state buttons. Is there a way to stop the menu from closing when any of the state buttons are closed?
The state buttons controls the appstyling theme of the interface, and it would be nice to be able click the different options and view the interface without having to open the menu time after time...
/Henrik
Hello Henrik,
At that moment we have not such functionality, but maybe one possible approach to achieve desired behavior could be if you implement the code below:
private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
if (e.Tool.Owner.GetType() == typeof(PopupMenuTool))
((PopupMenuTool)e.Tool.Owner).DropDown();
}
Let me know if you have any questions.
Regards
from what I can see, this code generates an error saying that it is not possible to open teh dropdown since the menu isn't open.
perhaps, the menu is already closed when this event is executed?
Hi
Please take a look on attached sample and video file for more details and if you think that I didn`t reproduce your scenario, please feel free to modify this sample and revert it back to me. I`ll be glad to research it for you.
Your example works like a glove but, i have the tool inside the ribbon menu. Thatis the difference. I added your popup...2 to the ribbon menu in your example, and I get the same error then...
any ideas..
Hello Zlatan,
I`m not sure what kind of tool is inside and how to reproduce your issue. Please modify my sample to reproduce your issue and revert it back to me. I`ll be glad to take a look on it.
what I mean is that I added the popup tool that you created to the ribbon drop down menu instead (using "insert existing tool").
if you click the round ribbon button, this tool will be visible.
it seems like the behavior of your code works differently depending on if the tool is placed in a toolbar or a menu.
Do you follow?
/H
Thanks for the feedback. If you have any questions, feel free to write us
That more or less did the trick. Depending on where in the menu-system the tool is located, you have to activate a set of operation to make it stay opened.
In my case, I had to execute the following lines.
tbm.Ribbon.ApplicationMenu.DropDown()
e.Tool.Owner.Owner.DropDown()
e.Tool.Owner.DropDown()
OK. If so, maybe you could try the code:
ultraToolbarsManager1.Ribbon.ApplicationMenu.DropDown();
Let me know if you have any questions
Sorry, I guess that you are calling it ApplicationMenu. The big dropdown that appears when you click the round ribbon button...
I`m not able to follow you. What you mean with "...to the ribbon drop down menu...". Do you mean QuickAccessToolbar ? Or maybe you are talking about ApplicationMenu or ApplicationMenu2010.
Zlatan said:it seems like the behavior of your code works differently depending on if the tool is placed in a toolbar or a menu