private void ToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) { switch (e.Button.Tag.ToString()) { case "Zoom In": winformsMap1.CurrentExtent.ScaleDown(50); break; case "Zoom Out": winformsMap1.CurrentExtent.ScaleUp(50); break; case "Full Extent": winformsMap1.CurrentExtent = fullExtent; break; case "Pan Left": winformsMap1.CurrentExtent = ExtentHelper.Pan(winformsMap1.CurrentExtent, PanDirection.Left, 20); break; case "Pan Right": winformsMap1.CurrentExtent = ExtentHelper.Pan(winformsMap1.CurrentExtent, PanDirection.Right, 20); break; case "Pan Up": winformsMap1.CurrentExtent = ExtentHelper.Pan(winformsMap1.CurrentExtent, PanDirection.Up, 20); break; case "Pan Down": winformsMap1.CurrentExtent = ExtentHelper.Pan(winformsMap1.CurrentExtent, PanDirection.Down, 20); break; default: break; } winformsMap1.Refresh(); }