title: A New and Full Implementation of Generic Intellisense
body: <p>I am interested in writing a generic Intellisense enabled editor for SQL and C# (et al. if possible!). I would like to do this in C# as an overridden or extended WPF richTextBox-type control. I know there are many example projects available and I have implemented a <em>basic</em> version of my own; but most of the examples that I have come across (and indeed my own) are just that, <em>basic</em>. </p>
  
  <p>A couple of code examples are: </p>
  
  <ol>
  <li><p><a href="http://www.codeproject.com/Articles/5839/DIY-Intellisense" rel="noreferrer">DIY Intellisense By yetanotherchris</a> </p></li>
  <li><p><a href="http://www.codeproject.com/Articles/29154/CodeTextBox-another-RichTextBox-control-with-synta" rel="noreferrer">CodeTextBox - another RichTextBox control with syntax highlighting and Intellisense By Tamas Honfi</a></p></li>
  </ol>
  
  <p>I have however, found a great example of an SQL editor with Intellisense <a href="http://www.codeproject.com/Articles/9465/QueryCommander-SQL-Editor" rel="noreferrer">QueryCommander SQL Editor By Mikael Håkansson</a> which seems to work well. Microsoft must use a XML library of command keywords, but my question is: How (in detail) do Microsoft implement their Intellisense (as-you-type Intellisense) and how hard would it be for me to create my own of the same standard?</p>
  
  <hr>
  
  <p><em>Edit A: A year on and I have managed to develop my own editor control with basic intellisense mainly for my own "enjoyment". I thought I would come back provide a list of freely available .NET projects that helped me with my own development and can be used out-of-the-box and free of charge:</em></p>
  
  <ol>
  <li><p><a href="http://www.codeproject.com/Articles/30936/Using-ICSharpCode-TextEditor" rel="noreferrer">ICSharpCode (WinForms)</a></p></li>
  <li><p><a href="http://www.codeproject.com/Articles/42490/Using-AvalonEdit-WPF-Text-Editor" rel="noreferrer">AvalonEdit (WPF)</a></p></li>
  <li><p><a href="http://scintillanet.codeplex.com/" rel="noreferrer">ScintillaNET (WinForms)</a></p></li>
  <li><p><a href="http://www.codeproject.com/Articles/9465/QueryCommander-SQL-Editor" rel="noreferrer">Query Commander [for example of intellisense implementation] (WinForms)</a></p></li>
  </ol>
  
  <hr>
  
  <p><em>Edit B: 15 months after the question was asked I am still looking for new improved editors. This one is nice...</em> </p>
  
  <ol>
  <li><em><a href="http://arbel.net/2013/05/11/roslynpad/" rel="noreferrer">RoslynPAD</a> is cool!</em></li>
  </ol>
  
  <hr>
  
  <p><em>Edit C: 2 years+ on from the question, I have found the following projects, both using WPF and backed by AvalonEdit.</em></p>
  
  <ol>
  <li><p><a href="https://github.com/lukebuehler/NRefactory-Completion-Sample" rel="noreferrer">CodeCompletion for AvalonEdit</a> using NRefactory. This project is really nice and has a full implementation of intellisense using NRefactory.</p></li>
  <li><p><a href="https://github.com/scriptcs/scriptcs" rel="noreferrer">ScriptCS</a> ScriptCS makes it easy to write and execute C# with a simple text editor.</p></li>
  </ol>