'宣言 Public ReadOnly Property CurrentState As UltraExplorerBarStates
public UltraExplorerBarStates CurrentState {get;}
このプロパティを使用すると、現在のコントロールの状態(編集モードかどうか、アクティブな UltraExplorerBarGroup または UltraExplorerBarItem が存在するかどうかなど)を確認できます。
可能な状態の完全なリストについては、UltraExplorerBarStates 列挙体のマニュアルを参照してください。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button6.Click ' If the ActiveItem is in the last group, activate the first Item in the ' previous Group. If ((Me.ultraExplorerBar1.CurrentState & UltraExplorerBarStates.ActiveItemIsInLastGroup) = UltraExplorerBarStates.ActiveItemIsInLastGroup) Then Me.ultraExplorerBar1.PerformAction(UltraExplorerBarAction.ActivateFirstItemInPreviousGroup) End If ' If the ActiveItem is in the first group, activate the first Item in the ' next Group. If ((Me.ultraExplorerBar1.CurrentState & UltraExplorerBarStates.ActiveItemIsInFirstGroup) = UltraExplorerBarStates.ActiveItemIsInFirstGroup) Then Me.ultraExplorerBar1.PerformAction(UltraExplorerBarAction.ActivateFirstItemInNextGroup) End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button6_Click(object sender, System.EventArgs e) { // If the ActiveItem is in the last group, activate the first Item in the // previous Group. if ((this.ultraExplorerBar1.CurrentState & UltraExplorerBarStates.ActiveItemIsInLastGroup) == UltraExplorerBarStates.ActiveItemIsInLastGroup) this.ultraExplorerBar1.PerformAction(UltraExplorerBarAction.ActivateFirstItemInPreviousGroup); // If the ActiveItem is in the first group, activate the first Item in the // next Group. if ((this.ultraExplorerBar1.CurrentState & UltraExplorerBarStates.ActiveItemIsInFirstGroup) == UltraExplorerBarStates.ActiveItemIsInFirstGroup) this.ultraExplorerBar1.PerformAction(UltraExplorerBarAction.ActivateFirstItemInNextGroup); }