void onRemovePointDataSummary(object sender, OpenReadCompletedEventArgs e) { if (e.Error != null) { return; } else { WebClient webClient = sender as WebClient; if (webClient != null) { string guid = webClient.Headers["RequestGuid"]; // Remove it from our cache : PDSummaries.Remove(guid); CommunitySummaries.Remove(guid); UserSummaries.Remove(guid); SummaryDeletedArgs args = new SummaryDeletedArgs(guid); SummaryDeleted(this, args); } } }
void Summaries_SummaryDeleted(object sender, SummaryDeletedArgs e) { Pushpin elem = (Pushpin)currentUserMapLayer.FindName(e.guid); if (elem != null) { currentUserMapLayer.Children.Remove(elem); elem = null; } _pointDataView.Visibility = Visibility.Collapsed; }