void visual_OnSourceDeath(OrganismVisual source, EventArgs e) { organismVisuals.Remove(source); foreach(UIElement visual in source.getVisuals()) { Dispatcher.Invoke(new Action(() => canvas.Children.Remove(visual))); } }
void visual_OnSourceDeath(OrganismVisual source, EventArgs e) { organismVisuals.Remove(source); foreach(UIElement visual in source.getVisuals()) { Dispatcher.Invoke(new Action(() => canvas.Children.Remove(visual))); } }