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"); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.