protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); Map1.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91); Map1.MapUnit = GeographyUnit.DecimalDegree; WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay(); Map1.CustomOverlays.Add(worldMapKitOverlay); ContextMenu menuOnEventLayer = new ContextMenu("area", 200); ContextMenuItem menu2 = new ContextMenuItem("click me"); menu2.Click += new EventHandler(menu2_Click); menuOnEventLayer.MenuItems.Add(menu2); Feature feature = new Feature(new RectangleShape(-110.22, 50, -80.03, 30)); Map1.HighlightOverlay.Features.Add("multipolygon", feature); Map1.HighlightOverlay.ContextMenu = menuOnEventLayer; Map1.HighlightOverlay.HighlightStyle = new FeatureOverlayStyle(GeoColor.SimpleColors.LightOrange, GeoColor.SimpleColors.Green, 1); } } void menu2_Click(object sender, ContextMenuItemClickEventArgs e) { Map1.HighlightOverlay.Style = new FeatureOverlayStyle(GeoColor.SimpleColors.LightRed, GeoColor.SimpleColors.Green, 1); }