ArcObjects Library Reference (Editor)  

IEditor.EditState Property

The editor's current edit state.

[Visual Basic .NET]
Public ReadOnly Property EditState As esriEditState
[C#]
public esriEditState EditState {get;}

Product Availability

Available with ArcGIS Desktop.

Description

The EditState property communicates the current state of the editor.

Remarks

EditState uses the esriEditState Constants enumeration to indicate the editor's current state. Valid states are:

esriStateNotEditing               0
esriStateEditing                     1
esriStateEditingUnfocused    2


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

[C#]

The get_EditState is used to return the enabled property of the tool.

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

 

See Also

IEditor Interface | esriEditState Constants

.NET Related Topics

Managing edit sessions and edit operations |