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