I'm trying to change the color of some of the ESRI 2d symbols available in the ArcGIS Portal. Below is my code. Is it possible to change the color of the returned symbols from the esri2DPointSymbolStyle.GetSymbolAsync call? If not is there a better solution to using and customizing the ArcGIS portal symbols or more information on how to use youre own icons?
private async Task CreateSymbology(FeatureLayer featureLayer, string symbolName)
{
// Create a portal to enable access to the symbols.
ArcGISPortal portal = await ArcGISPortal.CreateAsync();
// Create a SymbolStyle, this is used to return symbols based on provided symbol keys from portal.
SymbolStyle esri2DPointSymbolStyle = await SymbolStyle.OpenAsync("Esri2DPointSymbolsStyle", portal);
// This call is used to retrieve a single symbol for a given symbol name, if multiple symbol names are provided
// a multilayer symbol assembled and returned for the given symbol names.
Symbol symbol = await esri2DPointSymbolStyle.GetSymbolAsync(new List<string> { symbolName });
// Get the image source for the symbol to populate the legend UI.
RuntimeImage symbolSwatch = await symbol.CreateSwatchAsync();
ImageSource imageSource = await RuntimeImageExtensions.ToImageSourceAsync(symbolSwatch);
// Add the symbol the ObservableCollection containing the symbol legend data.
_symbolLegendCollection.Add(new SymbolLegendInfo() { Name = symbolName, ImageSource = imageSource });
SimpleRenderer sr = new SimpleRenderer(symbol);
featureLayer.Renderer = sr;
}