public void RemoveIncident(IncidentModel incident) { if (IncidentList.Contains(incident)) { IncidentList.Remove(incident); } }
private void OnIncidentDataRemoved(object sender, IncidentChangedEventArgs args) { args.IncidentIcon.IncidentIconDetails -= OnIncidentIconSelected; _mapService.RemoveIncident(args.IncidentIcon); _incidentListViewModel.RemoveIncident(args.IncidentIcon.Incident); IncidentList.Remove(args.IncidentIcon.Incident); }
public async void RemoveIncident(IncidentModel incident) { if (IncidentList.Contains(incident)) { await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { IncidentList.Remove(incident); }); } }