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); } }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.