I am trying to customize the selection symbol for a parcel polygon featurelayer in ArcGIS Pro 3.2.1. Below this layer in the TOC is a zoning layer with complex symbology. In some cases selected parcel polygons get visually lost. I'm trying to customize the selection symbol like this:
QueuedTask.Run(() =>
{
//clear existing parcel selection
_parcels.ClearSelection();
CIMStroke baseline = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(115, 223, 255, 0), 4.0, SimpleLineStyle.Solid);
CIMStroke dashLine = SymbolFactory.Instance.ConstructStroke(CIMColor.CreateRGBColor(255, 255, 255), 3.0, SimpleLineStyle.Dash);
CIMFill transpFill = SymbolFactory.Instance.ConstructSolidFill(CIMColor.NoColor());
List<CIMSymbolLayer> symbolLayers = new List<CIMSymbolLayer> { dashLine, baseline, transpFill };
CIMPolygonSymbol selectionSymbol = new CIMPolygonSymbol() { SymbolLayers = symbolLayers.ToArray() };
var layerDef = _parcels.GetDefinition() as CIMFeatureLayer;
layerDef.UseSelectionSymbol = false;
layerDef.SelectionSymbol = selectionSymbol.MakeSymbolReference();
_parcels.SetDefinition(layerDef);
});
I have tried this with .UseSelectionSymbol set to true which does not work either. Have I missed something along the way? Can we not customize the selection symbol for specific feature layers?