/// <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())); }