private void HeaderTapped(GroupViewModel item) { try { //Search for the position int selectedIndex = ExpandedGroups.IndexOf(item); AllGroups[selectedIndex].Expanded = !AllGroups[selectedIndex].Expanded; UpdateListContent(); } catch (Exception e) { //Application.Current.MainPage.DisplayAlert("Error","Error:"+e,"OK"); } }