Version

GetCategoryTools Method

Returns an array of ToolBase derived objects (tools) that have been assigned the specified Category.
Syntax
'Declaration
 
Public Function GetCategoryTools( _
   ByVal requestedCategory As String _
) As ToolBase()
public ToolBase[] GetCategoryTools( 
   string requestedCategory
)

Parameters

requestedCategory
The category to get the tool for.

Return Value

A collection of all root tools with the specified category.
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