Imports Infragistics.Win Imports Infragistics.Win.UltraWinListView <Flags()> _ Public Enum UIState None = 0 Visible = 1 Enabled = 2 HotTracking = 4 Active = 8 Selected = 16 End Enum Public Function GetItemState(ByVal item As UltraListViewItem) As UIState Dim retVal As UIState = UIState.None If (item.Visible) Then retVal = retVal Or UIState.Visible If (item.Enabled) Then retVal = retVal Or UIState.Enabled If (item.IsHotTracking) Then retVal = retVal Or UIState.HotTracking If (item.IsActive) Then retVal = retVal Or UIState.Active If (item.IsSelected) Then retVal = retVal Or UIState.Selected Return retVal End Function Public Function GetGroupState(ByVal group As UltraListViewGroup) As UIState Dim retVal As UIState = UIState.None If (group.Visible) Then retVal = retVal Or UIState.Visible If (group.Enabled) Then retVal = retVal Or UIState.Enabled Return retVal End Function
using Infragistics.Win; using Infragistics.Win.UltraWinListView; using System.Diagnostics; [Flags] public enum UIState { None = 0x0000, Visible = 0x0001, Enabled = 0x0002, HotTracking = 0x0004, Active = 0x0008, Selected = 0x0010, } public UIState GetItemState( UltraListViewItem item ) { UIState retVal = UIState.None; if ( item.Visible ) retVal |= UIState.Visible; if ( item.Enabled ) retVal |= UIState.Enabled; if ( item.IsHotTracking ) retVal |= UIState.HotTracking; if ( item.IsActive ) retVal |= UIState.Active; if ( item.IsSelected ) retVal |= UIState.Selected; return retVal; } public UIState GetGroupState( UltraListViewGroup group ) { UIState retVal = UIState.None; if ( group.Visible ) retVal |= UIState.Visible; if ( group.Enabled ) retVal |= UIState.Enabled; return retVal; }