private void WpfMap_Loaded(object sender, RoutedEventArgs e) { Map1.MapUnit = GeographyUnit.DecimalDegree; ShapeFileFeatureLayer countries02Layer = new ShapeFileFeatureLayer(@"..\..\sampledata\data\countries02.shp"); countries02Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; countries02Layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; ShapeFileFeatureLayer usStatesLayer = new ShapeFileFeatureLayer(@"..\..\sampledata\data\usstates.shp"); usStatesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; usStatesLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Water1; LayerOverlay ov = new LayerOverlay(); ov.Layers.Add(countries02Layer); ov.Layers.Add(usStatesLayer); countries02Layer.Open(); Map1.CurrentExtent = countries02Layer.GetBoundingBox(); countries02Layer.Close(); Map1.Overlays.Add(ov); Map1.Refresh(); }