public static void EnsureSelectionIsVisible(this FastObjectListView list) { if (list.InvokeRequired) { list.Invoke((Action)(() => { list.EnsureSelectionIsVisible(); })); return; } var obj = list.SelectedObject; if (obj != null) { list.EnsureModelVisible(obj); } }
public static void SelectNextOrFirst(this FastObjectListView list) { if (list.InvokeRequired) { list.Invoke((Action)(() => { list.SelectNextOrFirst(); })); return; } var nextItem = list.GetNextItem(list.SelectedItem); if (nextItem == null) { nextItem = list.GetNextItem(null); } list.SelectedItem = nextItem; }