public static MapControl GetMapControl() { MapControl mapControl = new MapControlClass(); var list = GetRenderersFile(); foreach (var item in list) { mapControl.AddLayerFromFile(item); } return mapControl; }