Hi Team,
I want to display tools in a grid style (listed horizontally) inside container area of the application menu 2010.
I'm using a ListTool which is added to a PopupMenuTool, but that displays as list (vertical list).
Please let me know how can achieve the grid style.
Hello Lakshman,
I have been investigating into the behavior you are looking to achieve, but at the moment, I am a little unsure of the area you are referring to when you name the “container area” of the ApplicationMenu2010.
Would it be possible for you to please provide an isolated sample project or mockup that shows what you have so far so I may be able to assist you better?
Please let me know if you have any other questions or concerns on this matter.
I can't upload the files because of security reasons.
I can point to the sample I'm referring to, it's in "Infragistics_WinForms_20201_Samples\2020.1\Windows Forms\Samples\CS\ToolbarsManager\RibbonTabItemVisibility"
// This tool will be displayed in the content area ListTool recentTool = new ListTool("Recent"); recentTool.ListToolItems.Add("doc1", "Document 1"); recentTool.ListToolItems.Add("doc2", "Document 2"); recentTool.ListToolItems.Add("doc3", "Document 3"); this.ultraToolbarsManager1.Tools.Add(recentTool); // Create a PopupMenu Tool that is displayed in navigation menu PopupMenuTool popupMenu1 = new PopupMenuTool("PopupRecent"); popupMenu1.Settings.PopupStyle = PopupStyle.Menu; popupMenu1.SharedProps.Caption = "Recent"; // Add PopupMenu Tool to the tools collection of UltraToolbarsManager this.ultraToolbarsManager1.Tools.Add(popupMenu1); popupMenu1.Tools.AddTool("RecentLabel"); popupMenu1.Tools.AddTool("Recent") ApplicationMenu2010 appMenu2010 = ultraToolbarsManager1.Ribbon.ApplicationMenu2010; appMenu2010.NavigationMenu.Tools.AddTool("PopupRecent");
Thank you for your update and for the sample reference.
Looking at your code, it appears that you are likely following the code example from our documentation, here, using the PopupMenuTool.
Instead of doing this, I would recommend still using the code snippet at that documentation article as guidance, but I would recommend using the PopupControlContainerTool instead, as the ListTool does not have a way to go into horizontal orientation and the PopupControlContainerTool allows you to specify a Control to place inside and this control can be anything, and so as long as you have a horizontally oriented Control or view, you can place that inside instead.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for the reply. I've searched for many controls that can be added to PopupControlContainerTool. But, I could only found UltraListView which gives me gridview of list of items. This does not suit my needs:
UltraListView ultraListView1 = new UltraListView(); ultraListView1.Width = 800; ultraListView1.Height = 500;
ultraListView1.Items.Add("Excel", rm.GetString("Excel")); ultraListView1.Items[0].Appearance.Image = this.imageList16x16.Images[0]; ultraListView1.Items.Add("Word", rm.GetString("Word")); ultraListView1.Items[1].Appearance.Image = this.imageList16x16.Images[1];
This is what I've achieved so far:
What I'm looking for is a Control which contains a list of buttons and that can be added to PopupControlContainerTool and fulfills the above mentioned points.
Could you suggest me any control to achieve what I'm looking for (or) if not, tweaks that I can do to UltraListView to achieve my requirement?
Thanks,
Lakshman
Thank you for your update on this matter.
Currently, I do not believe the Infragistics for Windows Forms toolset has a control that will really suit all of your needs here, as we don’t really have anything that will allow you to create a list of Buttons in this case, and you wouldn't be able to simply do this with the UltraListView. You may be better suited to use something like a FlowLayoutPanel with its FlowDirection set to a horizontal direction and its WrapContents property set to true.
Regarding the sizing part of your requirement as well, you could set the Dock property to Fill in order to get around explicitly specifying the Height and Width of the controls that you place within the PopupControlContainerTool.
Thanks Andrew, this has helped me.