'Declaration Public Property SelectedGroup As UltraExplorerBarGroup
public UltraExplorerBarGroup SelectedGroup {get; set;}
For control style ‘0 – ExplorerBar’ this property always returns null and if the property is set an exception is raised.
For control styles ‘1 – Listbar’ and ‘2 – Toolbox’ returns/sets the Group that is currently displaying its Items
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button13.Click ' Display the number of items in the currently selected group. Note that ' only control styles Listbar and Toolbox have the concept of SelectedGroup. If (Me.ultraExplorerBar1.Style = UltraExplorerBarStyle.Listbar Or Me.ultraExplorerBar1.Style = UltraExplorerBarStyle.Toolbox) Then If (Not Me.ultraExplorerBar1.SelectedGroup Is Nothing) Then Debug.WriteLine(String.Format("The Selected group contains {0} Items.", Me.ultraExplorerBar1.SelectedGroup.Items.Count)) End If End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button13_Click(object sender, System.EventArgs e) { // Display the number of items in the currently selected group. Note that // only control styles Listbar and Toolbox have the concept of SelectedGroup. if (this.ultraExplorerBar1.Style == UltraExplorerBarStyle.Listbar || this.ultraExplorerBar1.Style == UltraExplorerBarStyle.Toolbox) { if (this.ultraExplorerBar1.SelectedGroup != null) Debug.WriteLine(string.Format("The Selected group contains {0} Items.", this.ultraExplorerBar1.SelectedGroup.Items.Count)); } }
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