Select to view content in your preferred language

mouse click is not fired after using the editor control for selection

851
1
05-20-2011 03:21 PM
YingLin
Emerging Contributor
After user selecting features from the map, if they want to use the identify tool, the QueryPoint_MousClick event is not fired. I used Editor control for the selection with ContinuousMode set to be True. How do I disable the selection when user click on Identify tool?

Thanks very much
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Identify and Editor cannot be active at the same time. Your application need to decide when to turn on one or the other.

For example, if you have a CheckBox that indicates when you want Identify to be active, you can do the following:
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
 if (LayoutRoot == null) return;
 CheckBox cb = sender as CheckBox;
 Editor editor = this.LayoutRoot.Resources["MyEditor"] as Editor;
 if (editor == null) return;
 if (cb.IsChecked.HasValue)
 {
  if (cb.IsChecked.Value)
  {
   if (editor.CancelActive.CanExecute(null)) //deactivate Editor
    editor.CancelActive.Execute(null);
  }
  if (editor.Select.CanExecute("new")) //activate Editor.Select
   editor.Select.Execute("new");
 }
}
0 Kudos