// utility method returning object describing current group static internal GroupManager.GroupInfo GetGroupInfo(IntPtr hwnd, int groupID) { GroupManager.GroupInfo groupInfo = GroupManager.GroupInfo.Null; // if groupmanager is not available GetManager(hwnd) // will raise needed event GroupManager manager = WindowsListView._groupsCollection [hwnd]; groupInfo = manager.GetGroupInfo(groupID); if (!groupInfo) { // LV control did not raise the needed event // Microsoft - We may want to consider raising the event here // The M7 work on checking if LE is valid however is the better way of going // RemoveGroupAndRaiseLogicalChangedEvent(_hwnd); throw new InvalidOperationException(SR.Get(SRID.OperationCannotBePerformed)); } return(groupInfo); }