THIS IS A REPOST – This article was written 8 Oct 2009 but was not migrated to my new server… I had a couple of people asking me for this article and decided to repost it! Sorry if you have already read it.
Ok, so I might be stretching reality just a “little” but the purpose of this post is to introduce you to two control libraries that might just do that!
AvalonEdit is the new WPF-based editor used in SharpDevelop 4.x. Using the AvalonEdit control is very similar to using a normal
To load a document…
And finally, to turn on syntax highlighting?
textEditor1.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#");
If you want to learn more about AvalonEdit, you MUST read Daniel Grunwald’s awesome CodeProject article about AvalonEdit available here (also read the Document and Rendering that was removed from the original article).
AvalonDock is a WPF controls library which can be used to create a docking layout system like that is present in Visual Studio. It supports fly-out panes, floating windows, multiple docking manager in same window, styles and themes and it can host WinForms controls.
<avalonDock:DockableContent Title="Error List">
<avalonDock:DockableContent Title="Solution Explorer">
“DockingManager is responsible to arrange its children (called 'contents') and to perform docking functionalities.”
“A ResizingPanel is a panel-derived class which arranges its children along a direction (called Orientation as happen in the StackPanel class). Between two consecutive children, the ResizingPanel automatically inserts a ResizingPanelSplitter. User drags splitters to resize elements of a ResizingPanel (in the same manner of Grid panel).”
DockableContent & DocumentContent
“In AvalonDock, 'contents' are objects of type DockableContent or DocumentContent both deriving from ManagedContent. As names suggest, a DockableContent is a content which users can redock to a border of the parent DockingManager, can hide or can leave floating over the main window.”
DockablePane & DocumentPane
“A DockablePane can contain only DockableContents and can be dragged and redocked to a border of parent DockingManager. In addition, a DockablePane can be autohidden ('unpinned') or floated, that is hosted in a floating window. A DocumentPane can contain both DocumentContents and DockableContents and can't be moved.”
Taken from the EXCELLENT AvalonDock Tutorial.
Ok, so this isn't an IDE yet but they are some of the controls being used in developing #develop 4.x! Download #develop and check it out!!!