private void TextEditor_Initialized(TextEditor lineEditor, EventArgs e)
        {
            PromptAdorner.AddTo(lineEditor);
            lineEditor.TextArea.MouseWheel += TextArea_MouseWheel;

            var lineNumber = lineEditor.ViewModel().Id;

            lineEditor.TextArea.TextView.LineTransformers.Add(
                new AvalonSyntaxHighlightTransformer(services, lineNumber)
                );
        }
        public void PromptAdorner_RendersPrompt_WithoutError()
        {
            var editor  = new TextEditor();
            var adorner = new PromptAdorner(editor)
            {
                Visibility = Visibility.Visible
            };

            adorner.InvalidateArrange();

            // system under test
            adorner.Arrange(new Rect(new Size(100, 100)));
        }
Example #3
0
        private void TextEditor_Initialized(TextEditor lineEditor, EventArgs e)
        {
            PromptAdorner.AddTo(lineEditor);
            lineEditor.TextArea.MouseWheel += TextArea_MouseWheel;

            var line = lineEditor.ViewModel();

            line.SetEditor(lineEditor);
            line.TriggerIntellisense = (completions, onClosed) =>
                                       new IntellisenseWindow(lineEditor.TextArea, completions, onClosed);
            lineEditor.TextArea.TextView.LineTransformers.Add(
                new AvalonSyntaxHighlightTransformer(replServices, line.Id)
                );
        }