the AvalonEdit example shows the code Completion, codes bellow
void textEditor_TextArea_TextEntered(object sender, TextCompositionEventArgs e) {if (e.Text == ".") {// Open code completion after the user has pressed dot: completionWindow = new CompletionWindow(textEditor.TextArea); IList<ICompletionData> data = completionWindow.CompletionList.CompletionData; data.Add(new MyCompletionData("Item1")); data.Add(new MyCompletionData("Item2")); data.Add(new MyCompletionData("Item3")); completionWindow.Show(); completionWindow.Closed += delegate { completionWindow = null; }; } } and i want to know the words before the dot ,is there any idea? |