Version

Add(String,String) Method

Creates and adds a UltraExplorerBarGroup to the collection with the specified key and text.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal key As String, _
   ByVal text As String _
) As UltraExplorerBarGroup
public UltraExplorerBarGroup Add( 
   string key,
   string text
)

Parameters

key
The key of the new group.
text
The text of the new group.

Return Value

The newly-created group.
Example
The following code shows how to use the various overloads of the Groups colllection Add Method.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button83_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button83.Click

		' Add groups to the Groups collection using the different overloads.

		' Groups.Add()
		Dim group As UltraExplorerBarGroup = Me.ultraExplorerBar1.Groups.Add()

		group.Text = "FirstGroupAdded"


		' Groups.Add(UltraExplorerBarGroup group)
		group = New UltraExplorerBarGroup("SecondGroupKey")
		group.Text = "SecondGroupAdded"

		Dim index As Integer = Me.ultraExplorerBar1.Groups.Add(group)


		' Groups.Add(string Key, string Text)
		group = Me.ultraExplorerBar1.Groups.Add("ThirdGroupKey", "ThirdGroup")


		' Groups.Add(string Key)
		group = Me.ultraExplorerBar1.Groups.Add("FourthGroupKey")


		' Groups.Add(string Key)
		Dim group1 As UltraExplorerBarGroup = New UltraExplorerBarGroup()
		Dim group2 As UltraExplorerBarGroup = New UltraExplorerBarGroup()
		Dim group3 As UltraExplorerBarGroup = New UltraExplorerBarGroup()
		Dim group4 As UltraExplorerBarGroup = New UltraExplorerBarGroup()

		Me.ultraExplorerBar1.Groups.AddRange(New UltraExplorerBarGroup() {group1, group2, group3, group4})

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


		private void button83_Click(object sender, System.EventArgs e)
		{
			// Add groups to the Groups collection using the different overloads.

			// Groups.Add()
			UltraExplorerBarGroup group = this.ultraExplorerBar1.Groups.Add();

			group.Text = "FirstGroupAdded";


			// Groups.Add(UltraExplorerBarGroup group)
			group		= new UltraExplorerBarGroup("SecondGroupKey");
			group.Text	= "SecondGroupAdded";

			int index	= this.ultraExplorerBar1.Groups.Add(group);


			// Groups.Add(string Key, string Text)
			group = this.ultraExplorerBar1.Groups.Add("ThirdGroupKey", "ThirdGroup");


			// Groups.Add(string Key)
			group = this.ultraExplorerBar1.Groups.Add("FourthGroupKey");


			// Groups.Add(string Key)
			UltraExplorerBarGroup group1	= new UltraExplorerBarGroup();
			UltraExplorerBarGroup group2	= new UltraExplorerBarGroup();
			UltraExplorerBarGroup group3	= new UltraExplorerBarGroup();
			UltraExplorerBarGroup group4	= new UltraExplorerBarGroup();
			this.ultraExplorerBar1.Groups.AddRange(new UltraExplorerBarGroup [] { group1, group2, group3, group4 } );

		}
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