Public Sub SelectLayers( _ ByVal layers As IReadOnlyCollection(Of Layer) _ )
public void SelectLayers( IReadOnlyCollection<Layer> layers )
Parameters
- layers
Public Sub SelectLayers( _ ByVal layers As IReadOnlyCollection(Of Layer) _ )
public void SelectLayers( IReadOnlyCollection<Layer> layers )
{
//Zoom to the selected layers in the TOC
var featureLayers = mapView.Map.Layers.OfType<FeatureLayer>();
mapView.SelectLayers(featureLayers.ToList());
}
{
// select it in the TOC
List<Layer> layersToSelect = [featureLayer];
MapView.Active.SelectLayers(layersToSelect);
// now execute the layer properties command
var wrapper = FrameworkApplication.GetPlugInWrapper("esri_mapping_selectedLayerPropertiesButton");
var command = wrapper as ICommand;
if (command == null)
{
// the command is not found, leave
}
// execute the command
if (command.CanExecute(null))
command.Execute(null);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)