Thanks Torsten,
I tried with the how do I sample. CreateClassBreakStyleSample.xaml.cs missed one line
mapView.Refresh();
So the full code will like this
private void MapView_Loaded(object sender, RoutedEventArgs e)
{
// Set the map’s unit of measurement to meters(Spherical Mercator)
mapView.MapUnit = GeographyUnit.Meter;
// Add Cloud Maps as a background overlay
var thinkGeoCloudVectorMapsOverlay = new ThinkGeoCloudVectorMapsOverlay("itZGOI8oafZwmtxP-XGiMvfWJPPc-dX35DmESmLlQIU~", "bcaCzPpmOG6le2pUz5EAaEKYI-KSMny_WxEAe7gMNQgGeN9sqL12OA~~", ThinkGeoCloudVectorMapsMapType.Light);
mapView.Overlays.Add(thinkGeoCloudVectorMapsOverlay);
ShapeFileFeatureLayer housingUnitsLayer = new ShapeFileFeatureLayer(@"../../../Data/Shapefile/Frisco 2010 Census Housing Units.shp");
LegendAdornmentLayer legend = new LegendAdornmentLayer();
// Setup the legend adornment
legend.Title = new LegendItem()
{
TextStyle = new TextStyle("Housing Units", new GeoFont("Verdana", 10, DrawingFontStyles.Bold), GeoBrushes.Black)
};
legend.Location = AdornmentLocation.LowerRight;
mapView.AdornmentOverlay.Layers.Add(legend);
// Project the layer's data to match the projection of the map
housingUnitsLayer.FeatureSource.ProjectionConverter = new ProjectionConverter(2276, 3857);
AddClassBreakStyle(housingUnitsLayer, legend);
// Add housingUnitsLayer to a LayerOverlay
var layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(housingUnitsLayer);
// Add layerOverlay to the mapView
mapView.Overlays.Add(layerOverlay);
// Set the map extent
housingUnitsLayer.Open();
mapView.CurrentExtent = housingUnitsLayer.GetBoundingBox();
housingUnitsLayer.Close();
mapView.Refresh();
}
Here is the result
You can see the Legend does show up on the lower right of the map. Or I may misunderstand the issue. If you could provide us a small sample to re-produce the issue that will be very helpful for us to look into more details.
Thanks
Frank