private void Legend_Refreshed(object sender, ESRI.ArcGIS.Client.Toolkit.Legend.RefreshedEventArgs e) { var items = e.LayerItem.LegendItems; if (e.LayerItem.Layer is FeatureLayer && items != null) { // Group the items by Label and keep only the first one var toRemove = items.GroupBy(item => item.Label).SelectMany(g => g.Skip(1)).ToArray(); foreach (var item in toRemove) items.Remove(item); } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.