public void SetUseDefaultSelectionColor()
Public Sub SetUseDefaultSelectionColor()
public void SetUseDefaultSelectionColor()
Public Sub SetUseDefaultSelectionColor()
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
await QueuedTask.Run(() =>
{
if (featureLayer.SupportsCustomSelectionProperties())
{
// get the set of properties
var (useCustomSelectioncolur, customSelectionColor, usecustomSelectioinFilleColor, customSelectionFillColor) = featureLayer.GetCustomSelectionProperties();
// set the layer to use a specific color
featureLayer.SetCustomSelectionColor(ColorFactory.Instance.RedRGB);
// or set a specific color AND fill color
featureLayer.SetCustomSelectionColor(ColorFactory.Instance.RedRGB, ColorFactory.Instance.BlueRGB);
// reset to use the default selection color
featureLayer.SetUseDefaultSelectionColor();
}
if (!featureLayer.IsVisible)
{
featureLayer.SetVisibility(true);
}
//Do a selection
mapView.SelectFeatures(mapView.Extent);
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)