public static int GetCurrentlyPlayingGroupIndex(this GroupedObservableCollection <IGroupKey, Mediafile> collection) { return(collection?.IndexOf(GetCurrentlyPlayingGroup(collection)) ?? 0); }