public SearchResultsPad()
        {
            if (instance != null)
            {
                throw new InvalidOperationException("Cannot create multiple instances");
            }
            instance = this;
            toolBar  = new ToolBar();
            ToolBarTray.SetIsLocked(toolBar, true);
            defaultToolbarItems = ToolBarService.CreateToolBarItems(contentPanel, this, "/SharpDevelop/Pads/SearchResultPad/Toolbar");
            foreach (object toolBarItem in defaultToolbarItems)
            {
                toolBar.Items.Add(toolBarItem);
            }

            contentPlaceholder = new ContentPresenter();
            contentPanel       = new Grid {
                Children = { toolBar, contentPlaceholder }
            };

            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });

            Grid.SetRow(contentPlaceholder, 1);
        }
        public static SearchResultMatch Create(IDocument document, TextLocation startLocation, TextLocation endLocation, IHighlighter highlighter)
        {
            int startOffset      = document.GetOffset(startLocation);
            int endOffset        = document.GetOffset(endLocation);
            var inlineBuilder    = SearchResultsPad.CreateInlineBuilder(startLocation, endLocation, document, highlighter);
            var defaultTextColor = highlighter.DefaultTextColor;

            return(new SearchResultMatch(FileName.Create(document.FileName),
                                         startLocation, endLocation,
                                         startOffset, endOffset - startOffset,
                                         inlineBuilder, defaultTextColor));
        }
		public SearchResultsPad()
		{
			if (instance != null)
				throw new InvalidOperationException("Cannot create multiple instances");
			instance = this;
			toolBar = new ToolBar();
			ToolBarTray.SetIsLocked(toolBar, true);
			defaultToolbarItems = ToolBarService.CreateToolBarItems(dockPanel, this, "/SharpDevelop/Pads/SearchResultPad/Toolbar");
			foreach (object toolBarItem in defaultToolbarItems) {
				toolBar.Items.Add(toolBarItem);
			}
			
			DockPanel.SetDock(toolBar, Dock.Top);
			contentPlaceholder = new ContentPresenter();
			dockPanel = new DockPanel {
				Children = { toolBar, contentPlaceholder }
			};
		}
        public SearchResultsPad()
        {
            if (instance != null)
            {
                throw new InvalidOperationException("Cannot create multiple instances");
            }
            instance = this;
            toolBar  = new ToolBar();
            ToolBarTray.SetIsLocked(toolBar, true);
            defaultToolbarItems = ToolBarService.CreateToolBarItems(dockPanel, this, "/SharpDevelop/Pads/SearchResultPad/Toolbar");
            foreach (object toolBarItem in defaultToolbarItems)
            {
                toolBar.Items.Add(toolBarItem);
            }

            DockPanel.SetDock(toolBar, Dock.Top);
            contentPlaceholder = new ContentPresenter();
            dockPanel          = new DockPanel {
                Children = { toolBar, contentPlaceholder }
            };
        }
		public SearchResultsPad()
		{
			if (instance != null)
				throw new InvalidOperationException("Cannot create multiple instances");
			instance = this;
			toolBar = new ToolBar();
			ToolBarTray.SetIsLocked(toolBar, true);
			defaultToolbarItems = ToolBarService.CreateToolBarItems(contentPanel, this, "/SharpDevelop/Pads/SearchResultPad/Toolbar");
			foreach (object toolBarItem in defaultToolbarItems) {
				toolBar.Items.Add(toolBarItem);
			}
			
			contentPlaceholder = new ContentPresenter();
			contentPanel = new Grid {
				Children = { toolBar, contentPlaceholder }
			};
			
			contentPanel.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
			contentPanel.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });

			Grid.SetRow(contentPlaceholder, 1);
		}