I have a .stylx file which I have created in ArcGIS pro. Its a Mobile Style file in which I have copied some color ramps from Color Brewer schemes (system style of ArcGIS pro) into my style.
If I open that style file in ArcGIS Pro then it shows the color ramps Accurately.
I want to get all the Color Ramps programmatically from that style file using ArcGIS Maps SDK .Net (200.x)
I am using following code to get symbology. But when I query to get color ramps the query result (colorRampResults) has zero items.
private void TestMethod()
{
SymbolStyleSearchParameters searchParameters = new SymbolStyleSearchParameters();
string pathToStlyx = @D:\TestColorRamps.stylx;
SymbolStyle symbolstyle = SymbolStyle.OpenAsync(pathToStlyx).GetAwaiter().GetResult();
var colorRampResults = symbolstyle.SearchSymbolsAsync(searchParameters).GetAwaiter().GetResult();
//colorRampResults resulting enumeration has zero result items
}
How can I get Color Ramps from style file?
for reference I am attaching the .stylx file as well.
NOTE: Style file only has color ramps, it has no symbols in it.