It's important to understand that AvalonEdit is a composite control with the three layers: <code>TextEditor</code> (main control), <code>TextArea</code> (editing), <code>TextView</code> (rendering).
While the main control provides some convenience methods for common tasks, for most advanced features you have to work directly with the inner controls. You can access them using <code>textEditor.TextArea</code>
@ -188,7 +191,7 @@ It takes care of getting the document onto the screen.
@@ -188,7 +191,7 @@ It takes care of getting the document onto the screen.
<p>To do this in an extensible way, the <code>TextView</code> uses its own kind of model: the <code>VisualLine</code>.
Visual lines are created only for the visible part of the document.
The last step in the pipeline is the conversion to one or more <code>System.Windows.Media.TextFormatting.TextLine</code> instances. WPF then takes care of the actual text rendering.
<p>
The "element generators", "line transformers" and "background renderers" are the extension points; it is possible to add custom implementations of
@ -331,7 +334,7 @@ especially in languages like C# where sequences of <code>//</code> or <code>///<
@@ -331,7 +334,7 @@ especially in languages like C# where sequences of <code>//</code> or <code>///<
You only have to handle the text entering events to determine when you want to show the window; all the UI is already done for you.
@ -375,7 +378,7 @@ The <code>CompletionWindow</code> will actually never have focus - instead, it h
@@ -375,7 +378,7 @@ The <code>CompletionWindow</code> will actually never have focus - instead, it h
on the text area and passes them through its <code>ListBox</code>.
This allows selecting entries in the completion list using the keyboard and normal typing in the editor at the same time.
<p>For the sake of completeness, here is the implementation of the <code>MyCompletionData</code> class used in the code above:
<pre>/// Implements AvalonEdit ICompletionData interface to provide the entries in the
<prelang="cs">/// Implements AvalonEdit ICompletionData interface to provide the entries in the