public BasicGroup AddGroupCard(int groupID, int cardStartPos, int cardPos) { //basic card creation of position, id, etc BasicGroup group = new BasicGroup(); //hide the delete button if its All Contact group (which is not treated like a real group in the application) if (groupID == 1) { group.HideDeleteBtn(); cardPos += cardStartPos; } group.Left = 1; group.Top = cardPos; group.Name = "group" + groupID; var matcher = new CardMatcher(); string groupName = matcher.MatchGroupID(groupID); //groups aren't data bound so their information has to be set to //the BasicGroup properties manually group.SetGroupInfo(groupID.ToString(), groupName); CurrentGroupShowing = groupID.ToString(); GroupCards.Add(group); return(group); }