Version

UltraExplorerBarItem Class

The UltraExplorerBarItem object represents an Item within an UltraWinExplorerBar Group. Items are interface elements similar to menu items that invoke an action in the program when clicked. An Item consists of an icon and a text string that describes the function of the item. Items an be set to take on one of several pre-defined appearances, such as state (toggle) button or separator, in addition to the standard icon plus label appearance.

Many of the details of an Item's appearance are determined by the settings of the Group that contains the item. (Usually, these settings are derived from the GroupSettings object.) For example, Group-level settings will specify whether the item displays a large or a small icon, the relative position of the text and the icon, and so on. Also note that Items are not controls. While you can place WinForms controls in an UltraWinExplorerBar Group, doing so will hide any Items that exist in the Group. Items and WinForms controls are mutually exclusive within a single Group.

Syntax
'Declaration
 
Public Class UltraExplorerBarItem 
   Inherits Infragistics.Shared.KeyedSubObjectBase
   Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Shared.ISelectableItem, Infragistics.Win.Notifications.INotificationBadgeProvider 
public class UltraExplorerBarItem : Infragistics.Shared.KeyedSubObjectBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Shared.ISelectableItem, Infragistics.Win.Notifications.INotificationBadgeProvider  
Example
The following code shows how to use the various overloads of the items colllection Add Method.

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


	Private Sub Button88_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button88.Click

		' Add items to the Items collection using the different overloads.


		' Can't proceed unless we have at least 1 group.
		If (Me.ultraExplorerBar1.Groups.Count < 1) Then
			Return
		End If


		' Items.Add()
		Dim item As UltraExplorerBarItem = Me.ultraExplorerBar1.Groups(0).Items.Add()

		item.Text = "FirstItemAdded"


		' Items.Add(UltraExplorerBarItem item)
		item = New UltraExplorerBarItem("SecondItemKey")
		item.Text = "SecondItemAdded"

		Dim index As Integer = Me.ultraExplorerBar1.Groups(0).Items.Add(item)


		' Items.Add(string Key, string Text)
		item = Me.ultraExplorerBar1.Groups(0).Items.Add("ThirdItemKey", "ThirdItem")


		' Items.Add(string Key)
		item = Me.ultraExplorerBar1.Groups(0).Items.Add("FourthItemKey")


		' Items.Add(string Key)
		Dim item1 As UltraExplorerBarItem = New UltraExplorerBarItem()
		Dim item2 As UltraExplorerBarItem = New UltraExplorerBarItem()
		Dim item3 As UltraExplorerBarItem = New UltraExplorerBarItem()
		Dim item4 As UltraExplorerBarItem = New UltraExplorerBarItem()

		Me.ultraExplorerBar1.Groups(0).Items.AddRange(New UltraExplorerBarItem() {item1, item2, item3, item4})

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


		private void button88_Click(object sender, System.EventArgs e)
		{
			// Add items to the Items collection using the different overloads.


			// Can't proceed unless we have at least 1 group.
			if (this.ultraExplorerBar1.Groups.Count < 1)
				return;


			// Items.Add()
			UltraExplorerBarItem item = this.ultraExplorerBar1.Groups[0].Items.Add();

			item.Text = "FirstItemAdded";


			// Items.Add(UltraExplorerBarItem item)
			item		= new UltraExplorerBarItem("SecondItemKey");
			item.Text	= "SecondItemAdded";

			int index	= this.ultraExplorerBar1.Groups[0].Items.Add(item);


			// Items.Add(string Key, string Text)
			item = this.ultraExplorerBar1.Groups[0].Items.Add("ThirdItemKey", "ThirdItem");


			// Items.Add(string Key)
			item = this.ultraExplorerBar1.Groups[0].Items.Add("FourthItemKey");


			// Items.Add(string Key)
			UltraExplorerBarItem item1	= new UltraExplorerBarItem();
			UltraExplorerBarItem item2	= new UltraExplorerBarItem();
			UltraExplorerBarItem item3	= new UltraExplorerBarItem();
			UltraExplorerBarItem item4	= new UltraExplorerBarItem();
			this.ultraExplorerBar1.Groups[0].Items.AddRange(new UltraExplorerBarItem [] { item1, item2, item3, item4 } );
		}
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