コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 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();
         }
     }
 }