public HighlightingOptions() { // ensure all definitions from AddIns are registered so that they are available for the example view AvalonEditDisplayBinding.RegisterAddInHighlightingDefinitions(); InitializeComponent(); textEditor.Document.UndoStack.SizeLimit = 0; textEditor.Options = CodeEditorOptions.Instance; bracketHighlighter = new BracketHighlightRenderer(textEditor.TextArea.TextView); foldingManager = FoldingManager.Install(textEditor.TextArea); CodeEditorOptions.Instance.BindToTextEditor(textEditor); }
public HighlightingOptions() { // ensure all definitions from AddIns are registered so that they are available for the example view AvalonEditDisplayBinding.RegisterAddInHighlightingDefinitions(); InitializeComponent(); textEditor.Document.UndoStack.SizeLimit = 0; CodeEditorOptions.Instance.BindToTextEditor(textEditor); textEditor.Options = new TextEditorOptions(CodeEditorOptions.Instance); bracketHighlighter = new BracketHighlightRenderer(textEditor.TextArea.TextView); foldingManager = FoldingManager.Install(textEditor.TextArea); textMarkerService = new TextMarkerService(textEditor.Document); textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); textEditor.Document.GetRequiredService <IServiceContainer>().AddService(typeof(ITextMarkerService), textMarkerService); }