ArcObjects Library Reference (Editor)  

esriEditState Constants

Indicates whether editing is happening or not.

Constant Value Description
esriStateNotEditing 0 Not editing.
esriStateEditing 1 Editing.
esriStateEditingUnfocused 2 Editing, but the map is out of focus.

Product Availability

Available with ArcGIS Desktop.

Remarks

This enumeration, used with IEditor::EditState, communicates the current state of the editor.

esriStateNotEditing              An edit session has not been started on any map.
esriStateEditing                   An edit session has been started on the selected map.
esriStateEditingUnfocused     An edit session has been started but not on the selected map.

A good example of using this enumeration is setting the Enabled property on ICommand.


[C#]
public override bool Enabled
{
  get
    {
      if (m_editor == null)
        return false;
    
      return (m_editor.EditState == esriEditState.esriStateEditing)
    }
}
[Visual Basic .NET]
Public Overrides ReadOnly Property Enabled() As Boolean 
 Get
    Return (m_editor.EditState = esriEditState.esriStateEditing) 
 End Get
End Property   
 


 


Private Property Get Enabled() As Boolean
  Get
    If m_editor.EditState = esriStateEditing Then
      Enabled = True
    End If
  End Get
End Property

.NET Related Topics

Editor framework customizations | How to migrate from COM components to add-ins | Managing edit sessions and edit operations |