Click here to Skip to main content
Click here to Skip to main content

Tagged as

REPOST: Create your own IDE in 10 minutes

, 6 Sep 2010
Rate this:
Please Sign up or sign in to vote.
The purpose of this post is to introduce you to two control libraries that might just do that!

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

AvalonEdit is the new WPF-based editor used in SharpDevelop 4.x. Using the AvalonEdit control is very similar to using a normal TextBox!

<avalonEdit:TextEditor
    ShowLineNumbers="True"  
    Name="textEditor1"
    FontFamily="Consolas"
    FontSize="10pt"/>

To load a document…

textEditor1.Load("Window1.xaml.cs");

And finally, to turn on syntax highlighting?

textEditor1.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#");

Out-of-the box AvalonEdit supports ASP.NET, Boo, Coco/R grammars, C++, C#, HTML, Java, JavaScript, Patch files, PHP, TeX, VB, XML.

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

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:DockingManager>
    <avalonDock:ResizingPanel>
        <avalonDock:ResizingPanel Orientation="Vertical">
            <!--<span class="code-comment"> Documents (Window1.xaml.cs & App.xaml.cs) --></span>
            <avalonDock:DocumentPane>
                <avalonDock:DocumentContent Title="App.xaml.cs">
                    <avalonEdit:TextEditor
                        ShowLineNumbers="True"  
                        Name="textEditor2"
                        FontFamily="Consolas"
                        FontSize="10pt"/>
                </avalonDock:DocumentContent>
                <avalonDock:DocumentContent Title="Window1.xaml.cs">
                    <avalonEdit:TextEditor
                        ShowLineNumbers="True"  
                        Name="textEditor1"
                        FontFamily="Consolas"
                        FontSize="10pt"/>
                </avalonDock:DocumentContent>
            </avalonDock:DocumentPane>
            
            <!--<span class="code-comment"> Error List --></span>
            <avalonDock:DockablePane>
                <avalonDock:DockableContent Title="Error List">
                    <TextBox />
                </avalonDock:DockableContent>
            </avalonDock:DockablePane>
        </avalonDock:ResizingPanel>
        
        <!--<span class="code-comment"> Solution Explorer & Properties --></span>
        <avalonDock:DockablePane>
            <avalonDock:DockableContent Title="Solution Explorer">
                <TextBox />
            </avalonDock:DockableContent>
            <avalonDock:DockableContent Title="Properties">
                <TextBox />
            </avalonDock:DockableContent>
            
        </avalonDock:DockablePane>        
        
    </avalonDock:ResizingPanel>
</avalonDock:DockingManager>

DockingManager

“DockingManager is responsible to arrange its children (called 'contents') and to perform docking functionalities.”

ResizingPanel

“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!!!

Also Read

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

rudigrobler

South Africa South Africa
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 PinmemberToan Pham Anh22-Feb-14 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 7 Sep 2010
Article Copyright 2010 by rudigrobler
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid