Thanks for the reply Jennifer. Your first suggestion causes the MouseEnter event to fire for all graphics in my graphics layer. I just want it to fire for the graphic that is being edited.Your second suggestion is an interesting piece of information, but I can't get any events to fire on that "editing" graphics layer. I've tied into the Map.Layers.CollectionChanged event and I can get a handle on that editing graphics layer. At that point I subscribe to a couple of its events, but no matter what I do those events do not get fired. I can click on a graphic to start editing it, I can perform some edits, I can commit those edits, and no events on that editing graphics layer ever fire.Do you actually have this working in your code somewhere? In principal this is exactly what I'd like to be able to do, but it doesn't seem to be working. Here's my code ...
void Layers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.NewItems != null && e.NewItems[0] is GraphicsLayer)
{
GraphicsLayer editLyr = e.NewItems[0] as GraphicsLayer;
if (editLyr.ID == null)
{
editLyr.MouseEnter += new GraphicsLayer.MouseEventHandler(editLyr_MouseEnter);
editLyr.MouseLeftButtonDown += new GraphicsLayer.MouseButtonEventHandler(editLyr_MouseLeftButtonDown);
editLyr.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(editLyr_PropertyChanged);
}
}
}
void editLyr_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
MessageBox.Show(e.PropertyName);
}
void editLyr_MouseEnter(object sender, GraphicMouseEventArgs e)
{
MessageBox.Show("MouseEnter");
}
void editLyr_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
MessageBox.Show("MouseLeftButtonDown");
}