'宣言 Public Class UltraExplorerBarGroupsCollection Inherits Infragistics.Shared.KeyedSubObjectsCollectionBase
public class UltraExplorerBarGroupsCollection : Infragistics.Shared.KeyedSubObjectsCollectionBase
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button7.Click ' Count the total number of items in all Groups. Dim totalItems As Integer = 0 Dim group As UltraExplorerBarGroup For Each group In Me.ultraExplorerBar1.Groups totalItems += group.Items.Count Next End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button7_Click(object sender, System.EventArgs e) { // Count the total number of items in all Groups. int totalItems = 0; foreach(UltraExplorerBarGroup group in this.ultraExplorerBar1.Groups) { totalItems += group.Items.Count; } }