title: Making AvalonEdit MVVM compatible
body: <p>I'm trying to make Avalon MVVM compatible in my WPF application. From googling, I found out that <a href="http://community.sharpdevelop.net/forums/t/11587.aspx" rel="noreferrer">AvalonEdit is not MVVM friendly</a> and I need to export the state of AvalonEdit by making a class derived from TextEditor then adding the necessary dependency properties. I'm afraid that I'm quite lost in Herr Grunwald's answer <a href="http://community.sharpdevelop.net/forums/t/11587.aspx" rel="noreferrer">here</a>:</p>
  
  <blockquote>
    <p>If you really need to export the state of the editor using MVVM, then I suggest you create a class deriving from TextEditor which adds the necessary dependency properties and synchronizes them with the actual properties in AvalonEdit.</p>
  </blockquote>
  
  <p>Does anyone have an example or have good suggestions on how to achieve this?</p>