void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e) { //string previous = (e.PreviousSelection.FirstOrDefault() as ProfileLocal)?.Name; selectedItem = e.CurrentSelection.FirstOrDefault() as ProfileLocal; ProfilesSelected.Add(selectedItem); if (selectedItem.Logo == "mail3") { ProfileEmail E = Converter.ToProfileEmail(selectedItem); MainViewModel.GetInstance().DetailsBoxEdith.removeProfileEmail(E); } else if (selectedItem.Logo == "tel3") { ProfilePhone P = Converter.ToProfilePhone(selectedItem); MainViewModel.GetInstance().DetailsBoxEdith.removeProfilePhone(P); } else if (selectedItem.Logo == "whatsapp3") { ProfileWhatsapp W = Converter.ToProfileWhatsapp(selectedItem); MainViewModel.GetInstance().DetailsBoxEdith.removeProfileW(W); } else if (selectedItem.Logo != "mail3" && selectedItem.Logo != "tel3" && selectedItem.Logo != "whatsapp3") { ProfileSM SM = Converter.ToProfileSM(selectedItem); MainViewModel.GetInstance().DetailsBoxEdith.removeProfileSM(SM); } }
public void addProfile(ProfileLocal _profileSelected) { ProfilesSelected.Add(_profileSelected); }