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