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"); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.