/// <summary> /// returns The index of the first selected item. The top item has an index of 0. Nothing selected has an index of -1. /// </summary> /// <returns>The selected index.</returns> public int getSelectedIndex() { var selected = _selection.items(); return(selected.Count == 0 ? -1 : _items.IndexOf(selected.First())); }