private void ApplyExtent() { double deltaX = (map.extent.maxx - map.extent.minx) * zoomFactor / 2; double deltaY = (map.extent.maxy - map.extent.miny) * zoomFactor / 2; double centerX = double.Parse(textBoxX.Text); double centerY = double.Parse(textBoxY.Text); map.setExtent(centerX - deltaX, centerY - deltaY, centerX + deltaX, centerY + deltaY); if (textBoxRotation.Text != "") { map.setRotation(double.Parse(textBoxRotation.Text)); } if (target != null) { target.RaisePropertyChanged(this); } double zoom = (map.extent.maxx - map.extent.minx); if (mapunits != map.units) { zoom = zoom * MapUtils.InchesPerUnit(map.units) / MapUtils.InchesPerUnit(mapunits); } if (target != null) { target.RaiseZoomChanged(this, Math.Round(zoom, unitPrecision), map.scaledenom); } zoomFactor = 1.0; }