private void GeoView_LayerViewStateChanged(object sender, Esri.ArcGISRuntime.Mapping.LayerViewStateChangedEventArgs e) { if (layerContentList != null) { var l = layerContentList.FirstOrDefault(t => t.LayerContent == e.Layer); if (l != null) { l.UpdateLayerViewState(e.LayerViewState); } } }
private void MapView_LayerViewStateChanged(object sender, Esri.ArcGISRuntime.Mapping.LayerViewStateChangedEventArgs e) { if (e.LayerViewState == null || e.LayerViewState.Status != LayerViewStatus.Active) { return; } if (sender is MapView mapView) { mapView.LayerViewStateChanged -= MapView_LayerViewStateChanged; var graphicsBinding = BindingOperations.GetBinding(mapView, GeoView.GraphicsOverlaysProperty); if (graphicsBinding != null) { //graphicsBinding.UpdateTarget(); } } }