Version

GetCategories Method

Returns an array of strings representing the unique Category names that have been specified for all ToolBases in the controls RootToolsCollection collection.
Syntax
'Declaration
 
Public Function GetCategories() As String()
public string[] GetCategories()
Remarks
A collection of category names used by all root tools.
Example
The following code demonstrates how to process the list of all tool categories defined to the UltraToolbarsManager. It also processes the list of all tools associated with each category.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars

	Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click

		' Get an array of all defined tool categories.  For each category, get an array of
		' tools for that category.
		Dim toolCategories As String() = Me.UltraToolbarsManager1.GetCategories()
		Dim category As String
		For Each category In toolCategories
			Debug.WriteLine("Processing category '" + category + "'")

			Dim categoryTools As ToolBase() = Me.UltraToolbarsManager1.GetCategoryTools(category)

			Dim tool As ToolBase
			For Each tool In categoryTools
				Debug.WriteLine("    Processing tool '" + tool.Key + "'")
			Next
		Next

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;

		private void button13_Click(object sender, System.EventArgs e)
		{

			// Get an array of all defined tool categories.  For each category, get an array of
			// tools for that category.
			string [] toolCategories = this.ultraToolbarsManager1.GetCategories();
			foreach(string category in toolCategories)
			{
				Debug.WriteLine("Processing category '" + category + "'");

				ToolBase [] categoryTools = this.ultraToolbarsManager1.GetCategoryTools(category);
				foreach(ToolBase tool in categoryTools)
				{
					Debug.WriteLine("    Processing tool '" + tool.Key + "'");
				}
			}

		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also