Hi,
Do you see anything at all? An esri logo? A gray background grid?
Checking the sample, although it does not explicitly zoom to the extent of the ArcGISDynamicMapServiceLayer, that layer is the only one in the map and the MapView should automatically display. You could add the following lines of code which should force the MapView extent to that of the service. Or you may catch an exception if there is a problem initializing the layer:
await arcGISDynamicMapServiceLayer.InitializeAsync();
await MyMapView.SetViewAsync(new Viewpoint(arcGISDynamicMapServiceLayer.FullExtent));
Additionally, I note that sample does not handle the LayerLoaded event on the MapView. You do this by registering an event handler e.g.
MyMapView.LayerLoaded += MyMapView_LayerLoaded;
And then handling the event:
private void MyMapView_LayerLoaded(object sender, LayerLoadedEventArgs e)
{
if (e.LoadError != null)
{
MessageBox.Show(e.LoadError.Message, "Layer Error");
return;
}
}
Or alternatively use the MapView.LayersLoadedAsync awaitable task and check the LayerLoadedResult objects.
Cheers
Mike