public MainViewContent(string fileName, IWorkbenchWindow workbenchWindow)
        {
            codeEditor = new CodeEditor();

            textEditor = new TextEditor();
            textEditor.FontFamily = new FontFamily("Consolas");

            textEditor.TextArea.TextEntering += TextAreaOnTextEntering;
            textEditor.TextArea.TextEntered += TextAreaOnTextEntered;
            textEditor.ShowLineNumbers = true;

            var ctrlSpace = new RoutedCommand();
            ctrlSpace.InputGestures.Add(new KeyGesture(Key.Space, ModifierKeys.Control));
            var cb = new CommandBinding(ctrlSpace, OnCtrlSpaceCommand);
            // this.CommandBindings.Add(cb);

            adapter = new SharpSnippetTextEditorAdapter(textEditor);
            this.WorkbenchWindow = workbenchWindow;
            textEditor.TextArea.TextView.Services.AddService(typeof (ITextEditor), adapter);
            LoadFile(fileName);

            iconBarManager = new IconBarManager();
            textEditor.TextArea.LeftMargins.Insert(0, new IconBarMargin(iconBarManager));

            var textMarkerService = new TextMarkerService(textEditor.Document);
            textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
            textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
            textEditor.TextArea.TextView.Services.AddService(typeof (ITextMarkerService), textMarkerService);
            textEditor.TextArea.TextView.Services.AddService(typeof (IBookmarkMargin), iconBarManager);
        }