private void OnLayerViewStateChanged(object sender, LayerViewStateChangedEventArgs e)
{
// For each execution of the MapView.LayerViewStateChanged Event, get the name of
// the layer and its LayerViewState.Status
string lName = e.Layer.Name;
string lViewStatus = e.LayerViewState.Status.ToString();
// Display the layer name and view status in the appropriate Label control
switch (lName)
{
case "Tiled Layer":
StatusLabel_TiledLayer.Content = lName + " - " + lViewStatus;
break;
case "Image Layer":
StatusLabel_ImageLayer.Content = lName + " - " + lViewStatus;
break;
case "Feature Layer":
StatusLabel_FeatureLayer.Content = lName + " - " + lViewStatus;
break;
default:
break;
}
}
}