public CreateCSharpScriptCommand() { this.InitializeComponent(); var textMarkerService = new TextMarkerService(this.tbCode.Document); this.tbCode.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); this.tbCode.TextArea.TextView.LineTransformers.Add(textMarkerService); var services = (IServiceContainer)this.tbCode.Document.ServiceProvider.GetService(typeof(IServiceContainer)); if (services != null) { services.AddService(typeof(ITextMarkerService), textMarkerService); } this.textMarkerService = textMarkerService; this.tbCode.Document.TextChanged += this.Document_TextChanged; this.tbCode.TextArea.TextView.MouseHover += this.TextView_MouseHover; this.tbCode.TextArea.TextView.MouseHoverStopped += this.TextView_MouseHoverStopped; this.lbReferences.ItemsSource = this.references; this.ClearAll(); }