Solved! Go to Solution.
I am using 2.4 right now (I am waiting for the SL Viewer update before I upgrade). Do you happen to have an example of the LayerItem? I am very new to programming so I am not sure on how to do this.
Thanks!
private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e) { if (e.LayerItem.Label == "SchoolZones") e.LayerItem.Label = "School Zones" }
I have a layer set as SchoolZones to work with some of my code and I would like to to display on the legend as "School Zones". Is there a way to set which layer you want to display with the layer IDs and also include and alias on how to display the layers?
From 3.0, the Layer has a DisplayName property that can be used for that purpose.
With previous versions the workaround is to change the LayerItem Label on event Lgend.Refreshed.
I am using 2.4 right now (I am waiting for the SL Viewer update before I upgrade). Do you happen to have an example of the LayerItem? I am very new to programming so I am not sure on how to do this.
Thanks!
private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e) { if (e.LayerItem.Label == "SchoolZones") e.LayerItem.Label = "School Zones" }