You are right that when a selection on Graphics is made, "SelectionCount" and "SelectedGraphics" PropertyChanged are both raised. Can you share your code for selecting and unselecting graphic? If you wish to maintain just a single selection at one time, I suspect that you deselect the previous graphic before you select the next graphic. Is that right?
this.raiseSelectedGraphicsChange(newGraphic, true); this.raiseSelectedGraphicsChange(oldGraphic, false);
private void raiseSelectedGraphicsChange(Graphic g, bool isSelected) { if (isSelected) { this.selectedGraphics.Add(g); } else { this.selectedGraphics.Remove(g); } base.OnPropertyChanged("SelectedGraphics"); base.OnPropertyChanged("SelectionCount"); }
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.