public void SelectPrev() { if (_selected != null) _selected = _items.FirstOrDefault() != _selected ? _items[_items.FindIndex(x => x == _selected) - 1] : null; }
public void SelectNext() { if (_items.LastOrDefault() != _selected) _selected = _items[_items.FindIndex(x => x == _selected) + 1]; }
public void Deselect() { _selected = null; }
public void Reset() { _selected = null; }
public void AddItem(MenuItem item) { _items.Add(item); }