public void RemoveLayer(string name) { var layers = layerCollection.FindLayer(name).ToList(); for (int i = 0; i < layers.Count(); i++) { layerCollection.Remove(layers[i]); Layers.Remove(layers[i]); } OnLayersChanged(EventArgs.Empty); }