Good Afternoon Everyone,
So I have a button created and it is adding a feature class to my map via a FileGeodatabaseConnectionPath. As seen below.
// Add this in your OnClick code-behind for the button
if (MapView.Active?.Map == null) return;
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
// using the community sample dataset
using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(@"U:\environmental\envgist.gdb"))))
{
using (FeatureClass addFeatureClass = geodatabase.OpenDataset<FeatureClass>("counties"))
{
LayerFactory.Instance.CreateFeatureLayer(addFeatureClass, MapView.Active.Map, 0, "Counties");
}
}
});
What information do I need to add to apply symbology from a lyr/lyrx file to this feature class? The layer files are in a folder stored on the same location as the gdb.
Any help in the right direction is much appreciated.
Thank You,
Derek Salinas