'宣言 Public Property SelectedGroup As UltraExplorerBarGroup
public UltraExplorerBarGroup SelectedGroup {get; set;}
コントロール スタイル ‘0 – ExplorerBar’ では、このプロパティは常に null を返します。プロパティが設定されると例外が発生します。
コントロール スタイルが ‘1 – Listbar’ および ‘2 – Toolbox’ の場合は、現在その項目を表示している Group を返すまたは設定します。
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)); } }