AnsweredAssumed Answered

Feature Layer Label Style

Question asked by on May 8, 2017
Latest reply on May 9, 2017 by MBranscomb-esristaff



I want to add street lines with labels from a geodatabase.


I have this working using a FeatureLayer and a GeodatabaseFeatureTable.  I can easily control the styling of the line but see no way to simply set the label color.


Here is the code I am using to create the feature layer.


var gdb = await Esri.ArcGISRuntime.Data.Geodatabase.OpenAsync(f);


// get the first table

var gdbFeatureTable = gdb.GeodatabaseFeatureTable(0);

// create a FeatureLayer to display the table
fl = new FeatureLayer(gdbFeatureTable);


Symbol sym = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.Gray, 14);

SimpleRenderer sr = new SimpleRenderer(sym);


fl.Renderer = new SimpleRenderer(sym);

fl.LabelsEnabled = true;


This seems like such a simple thing, what am I missing?


Does anyone have any sample code?