public ResultsEditor()

in tools/Explorer/Views/ResultsEditor.cs [65:146]


        public ResultsEditor()
        {
            var fontFamilyBinding = new Binding("ResultFont")
            {
                Source = Properties.Settings.Default
            };
            this.SetBinding(FontFamilyProperty, fontFamilyBinding);

            var fontSizeBinding = new Binding("ResultsFontSize")
            {
                Source = Properties.Settings.Default
            };
            this.SetBinding(FontSizeProperty, fontSizeBinding);

            var showLineNumbersBinding = new Binding("ShowLineNumbers")
            {
                Source = Properties.Settings.Default
            };
            this.SetBinding(ShowLineNumbersProperty, showLineNumbersBinding);

            this.PreviewMouseWheel += ResultsEditor_PreviewMouseWheel;

            this.SyntaxHighlighting = (IHighlightingDefinition)(new HighlightingDefinitionTypeConverter()).ConvertFrom("XML");// this.LoadHighlightDefinition("XQuery.xshd");

            ICSharpCode.AvalonEdit.Search.SearchPanel.Install(this.TextArea);

            this.IsReadOnly = false;

            this.ContextMenu = new ContextMenu
            {
                ItemsSource = new[]
                {
                    new MenuItem {
                        Command = ApplicationCommands.Cut,
                        Icon = new Image {
                            Source = new BitmapImage(new Uri("images/Cut_16x.png", UriKind.Relative))
                        }},
                    new MenuItem {
                        Command = ApplicationCommands.Copy,
                        Icon = new Image {
                                Source = new BitmapImage(new Uri("images/Copy_16x.png", UriKind.Relative))
                            }},
                    new MenuItem {
                        Command = ApplicationCommands.Paste,
                        Icon = new Image {
                                Source = new BitmapImage(new Uri("images/Paste_16x.png", UriKind.Relative))
                        }},
                    new MenuItem()
                    {
                        Header = "Undo",
                        ToolTip = "Undo",
                        Icon = new Image
                        {
                            Source = new BitmapImage(new Uri("images/undo_16x.png", UriKind.Relative))
                        },
                        InputGestureText = "Ctrl+Z",
                        Command = new RelayCommand(
                            p => { this.Undo(); },
                            p => { return this.CanUndo; })
                    },
                    new MenuItem() {
                        Header = "Redo",
                        ToolTip = "Redo",
                        Icon = new Image
                        {
                            Source = new BitmapImage(new Uri("images/redo_16x.png", UriKind.Relative))
                        },
                        InputGestureText = "Ctrl+Y",
                        Command = new RelayCommand(
                            p => { this.Redo(); },
                            p => { return this.CanRedo; })
                    },
                    new MenuItem {
                        Command = ApplicationCommands.SelectAll,
                        Icon = new Image
                        {
                            Source = new BitmapImage(new Uri("images/SelectAll_16x.png", UriKind.Relative))
                        }
                    }
                }
            };
        }