Wpf Core: Error message when adding an overlay on the map

Thanks Steph,
No. You don’t have to add the map to the gird in code behind. What you are doing is correct with xaml . The point in the post is we can not just initialize the map by the simple two lines.

var FirstMap = new MapView();
FirstMap.Overlays?.Add(new LayerOverlay()); // Crash here

More detail is here

Sorry for the confuse. Back to your original issue. Could you send us the LayerService.cs file to us. We could look into more detail.

Thanks

Frank