title: Preventing Text From Updating In AvalonEdit
body: <p>I know you can disable input altogether if you handle the PreviewKeyDown event of the editor and then set the e.Handled of the KeyEventArgs to true. </p>
  
  <p>However, I'm trying to figure out how to prevent the document text from updating after the text is modified. I want to handle the Document.Changing event, like so:</p>
  
  <pre><code>textEditor.Document.Changing += Document_Changing;
  </code></pre>
  
  <p>where textEditor is my AvalonEdit editor. I want to retrieve the text that is being modified, in the function</p>
  
  <pre><code>private void Document_Changing(object sender, DocumentChangeEventArgs e)
  </code></pre>
  
  <p>and then do some computation based on it. However, I do not want the text to be updated in the editor before it's being processed. I'm doing some async processing in the Document_Changing, and I fire another event when it's finished, and only then I want it to update. I don't want to disable just visual updating, but updating the document altogether.</p>
  
  <p>So is there a way to disable this update, similar to how you can prevent input when handling keyboard-related events?</p>
  
  <p>Thank you in advance</p>