AnsweredAssumed Answered

How do I symbolize a feature class in a map using ArcGIS Pro SDK button?

Question asked by joneil1414 on Aug 13, 2018
Latest reply on Aug 14, 2018 by joneil1414


I have created an ArcGIS Pro button using ArcGIS Pro SDK to add a feature class to a map. My code is below. How would I add to this button to now symbolize that polygon feature class to have a black outline and yellow fill?


Here is what I have to add a feature class:


protected override void OnClick()
   if (MapView.Active?.Map == null) return;
   ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
      using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new       Uri(@"L:\data\ESRI_10_6\usa\census\states.gdb"))))
         using (FeatureClass addFeatureClass = geodatabase.OpenDataset<FeatureClass>("states"))
            LayerFactory.Instance.CreateFeatureLayer(addFeatureClass, MapView.Active.Map, 0, "states");



How do I now add to this button code to now symbolize as a black outline and yellow fill? How do I reference the above feature class that I just added to the map? I can't seem to figure out how to do this. Your help would be much appreciated.


Thank you!