private void B_Apply_Click(object sender, EventArgs e) { switch (TabControl_Prop.SelectedTab.Text) { case "Legend": _mapLayer.LegendScheme = legendSchemeControl1.LegendScheme; legendSchemeControl1.legendView1.Refresh(); break; case "Chart": ((VectorLayer)_mapLayer).RemoveCharts(); AddCharts(); break; } _mapFrame.UpdateLayerNode(_mapLayer.Handle); _legend.Refresh(); _mapFrame.MapView.PaintLayers(); }